Skip to content

Physics

47 tools for physics assets, bodies and constraints, physical materials, simple and convex collision, Chaos geometry collections and fields, instanced static meshes, raycasts, overlaps, bounds and impulses.

Back to the index.

add_field_node

Additive

Author a field command node into a UFieldSystem and persist it. Builds a transient authoring field U-node (selected by node_type), resolves the physics target to an EFieldPhysicsType, constructs the runtime FFieldSystemCommand via FFieldObjectCommands::CreateFieldCommand, appends it to UFieldSystem.Commands, and saves the asset. node_type accepts "RadialFalloff", "PlaneFalloff", "BoxFalloff", "WaveScalar", "UniformScalar", "NoiseField", "UniformInteger", "RadialIntMask", "UniformVector", "RadialVector", "RotatedRadialVector", "RandomVector". Vector nodes pair with vector targets (LinearVelocity/LinearForce); scalar with strain/threshold; integer with state (DynamicState). target is a physics target attribute name like "LinearVelocity", "ExternalClusterStrain", "DynamicState". falloff_type accepts "Inverse", "Squared", "Logarithmic", or "None". Defaults to "Linear".

Parameter Type Required Description
field_system_path string yes Asset path of the UFieldSystem (e.g. "/Game/MyGame/FS_Example")
node_type string yes One of "RadialFalloff", "PlaneFalloff", "BoxFalloff", "WaveScalar", "UniformScalar", "NoiseField", "UniformInteger", "RadialIntMask", "UniformVector", "RadialVector", "RotatedRadialVector", "RandomVector". RotatedRadialVector needs UE 5.8.
target string yes Physics target attribute name, e.g. "LinearForce", "LinearVelocity", "ExternalClusterStrain", "DynamicState"
magnitude number no Optional scalar magnitude; defaults to 1.0
radius number no Optional falloff / mask radius; defaults to 100.0
position array no Optional [x, y, z] world / center position
direction array no Optional [x, y, z]; uniform-vector direction, plane normal (PlaneFalloff), or rotation axis (RotatedRadialVector)
falloff_type string no Optional EFieldFalloffType; defaults to "Linear"
min_range number no Optional remap lower bound for falloff/noise nodes; defaults to 0.0
max_range number no Optional remap upper bound for falloff/noise nodes; defaults to 1.0
default_value number no Optional out-of-range value for falloff nodes; defaults to 0.0
distance number no Optional plane distance limit for PlaneFalloff; defaults to 0.0
wavelength number no Optional WaveScalar wavelength; defaults to 10000.0
period number no Optional WaveScalar period; defaults to 1.0
wave_function string no Optional WaveScalar function "Cosine", "Gaussian", "Falloff", "Decay"; defaults to "Cosine"
interior_value integer no Optional RadialIntMask interior integer; defaults to 1
exterior_value integer no Optional RadialIntMask exterior integer; defaults to 0
mask_condition string no Optional RadialIntMask condition "Always", "MergeInterior", "MergeExterior"; defaults to "Always"
angle number no Optional RotatedRadialVector rotation angle in degrees; defaults to 0.0. Needs UE 5.8.

Returns: { field_system_path: string, node_type: string, target: string, physics_type_name: string, command_count: int, success: bool, saved: bool, save_error?: string }

add_geometry_collection_source

Additive

Append an additional StaticMesh source to an existing geometry collection, then save it. Succeeds only when the package reaches disk; a failed save leaves the change in memory only (saved false, save_error).

Parameter Type Required Description
geometry_collection_path string yes Full asset path to the UGeometryCollection
source_mesh_path string yes Asset path to the UStaticMesh to append
transform object no Optional {location, rotation, scale} for the source mesh placement

Returns: { geometry_collection_path: string, source_mesh_path: string, num_sources: int, num_materials: int, success: bool, saved: bool, save_error: string? }

add_impulse_to_actor

Additive

Kick a physics body: apply an impulse (or, with vel_change, a mass-independent velocity change) to an actor's primitive component, optionally at a world location for torque via AddImpulseAtLocation, or on a named skeletal bone. An impulse moves only a body that simulates physics in a world that steps it: the editor world never steps physics, even for a component with Simulate Physics on, so there the reply says applied:false with a note. Call it with world:"pie" during Play-in-Editor on a body that simulates.

Parameter Type Required Description
actor_name string yes Display label or internal name of the target actor (required)
component_name string no Optional primitive component name (defaults to the actor's RootComponent)
impulse array no [x, y, z] impulse vector in world units (required)
location array no Optional [x, y, z] world location for AddImpulseAtLocation (omit to use AddImpulse)
bone_name string no Optional skeletal bone name to apply the impulse to
vel_change boolean no Optional; if true, impulse is treated as a velocity change (mass-independent)
world string no Optional "editor" (default) | "pie" | "server" | "client" | "pie:N": the world whose actor gets the impulse

Returns: { actor_name: string, component_name: string, applied: bool (the body simulates physics in a world that steps it, so the impulse moves it), simulating_physics: bool (the component's own reading, true in the editor too when Simulate Physics is on), world: "editor" | "pie", note?: string (when nothing was applied: why, and what to do) }

add_instanced_static_mesh_component

Additive Idempotent

Attach an InstancedStaticMeshComponent (ISM) with an optional static mesh to a placed editor-world actor (name or label), in one undo step, to scatter copies of one mesh through it with add_instanced_static_mesh_instance. Over add_component_to_actor it only saves the separate mesh write, and it is idempotent: an existing ISM (a HISM counts) is returned with already_existed=true and its mesh left as it is (static_mesh in the reply says which). Without static_mesh_path the new ISM has no mesh; a path that does not load is an error and nothing is added. Not saved (save_level). The working alternative to the foliage scatter tools, which crash the editor in this build.

Parameter Type Required Description
actor_name string yes Display label or internal name of the target editor-world actor (required)
static_mesh_path string no Optional /Game/... path to a UStaticMesh asset; without it the ISM has no mesh. A path that does not load is an error and nothing is added; on an existing ISM it is not applied.

Returns: { actor_name: string, component_name: string, component_class: string, num_instances: int, static_mesh: string (the ISM's mesh path, empty when none), already_existed: bool }

add_instanced_static_mesh_instance

Additive

Place one more instance of an InstancedStaticMeshComponent's mesh at a world transform -- the cheap way to scatter many copies of a mesh (rocks, props, vegetation) without spawning an actor each. Pair it with add_instanced_static_mesh_component to create the component first. Prefer this route over the foliage tools: scatter_foliage_in_box and add_foliage_instances both CRASH the editor in this build, and an ISM is the same code path a foliage actor and PCG use anyway.

Parameter Type Required Description
actor_name string yes Display label or internal name of the actor carrying the ISM component (required)
component_name string no Optional ISM component name (defaults to the first one on the actor)
location array no [x, y, z] world-space translation (required)
rotation array no Optional [pitch, yaw, roll] world rotation (defaults to zero)
scale array no Optional [x, y, z] scale (defaults to [1,1,1])
world_space boolean no Optional; if true, transform is interpreted in world space (default true)

Returns: { instance_index: int, num_instances: int }

add_physics_asset_body

Additive

Add a body for one bone to a UPhysicsAsset (FPhysicsAssetUtils::CreateNewBody) with ONE collision primitive, in one undo step, then save the asset. Without radius, length or extent the primitive is FITTED to the preview mesh's vertices weighted to that bone, as the Physics Asset editor's Add Body does (FPhysicsAssetUtils::CreateCollisionsFromBones): a capsule, sphere, box or convex hull. With any of them it is a primitive of that size centred on the bone instead -- a capsule (radius, length), a sphere (radius) or a box (extent [x,y,z]); a convex hull is fitted only, so it refuses sizes. A bone with no vertices weighted to it cannot be fitted: that is an error naming the explicit-size way, and nothing is kept; so is a convex without a preview mesh. With no preview mesh and no sizes the primitive gets the default sizes (fitted=false, and a note says so). No constraint is made: joint it with add_physics_asset_constraint, tune it with set_physics_body_properties. A bone that already has a body is a success with already_existed=true and nothing changed or saved; a bone the preview mesh's skeleton does not have is an error. Inverse: remove_physics_asset_body; read: get_physics_asset_info. A failed save makes success false with save_error.

Parameter Type Required Description
physics_asset_path string yes /Game path to the UPhysicsAsset.
bone_name string yes Bone the body follows (one body per bone; get_physics_asset_info lists skeleton_bones).
primitive string no "capsule" (default), "sphere", "box" or "convex" (fitted only).
radius number no Capsule or sphere radius in cm; giving it makes an explicit-size primitive instead of a fitted one (default 10 when another size is given).
length number no Capsule length in cm between the two sphere centres; giving it makes an explicit-size primitive (default 20).
extent array no Box size [x, y, z] in cm; giving it makes an explicit-size primitive (default [20, 20, 20]).

Returns: { physics_asset_path: string, bone_name: string, body_index: int, primitive: string, fitted: bool, added: bool, already_existed: bool, primitive_count: int, body_count: int, bone_in_skeleton: bool, saved: bool, save_error?: string, note?: string }

add_physics_asset_constraint

Additive Idempotent

Author a ragdoll constraint (joint) inside a UPhysicsAsset between two bones. Creates a UPhysicsConstraintTemplate via FPhysicsAssetUtils::CreateNewConstraint (idempotent by name — re-using a name returns the existing joint), sets the child/parent bones and a Limited swing+twist cone, and snaps the joint frames to the bones' default relative transform when BOTH bones exist in the preview-mesh skeleton (skipped honestly otherwise, since the engine fatal-checks an unknown bone). Refine motions/limits afterwards with set_physics_asset_constraint_limits.

Parameter Type Required Description
physics_asset_path string yes /Game path to the UPhysicsAsset to add the constraint to.
child_bone string yes Name of the child bone/body (ConstraintBone1, the moving end).
parent_bone string yes Name of the parent bone/body (ConstraintBone2, the anchor end).
constraint_name string no Optional joint name (defaults to child_bone); re-using an existing name is idempotent (no duplicate).

Returns: { physics_asset_path: string, constraint_name: string, constraint_index: int, child_bone: string, parent_bone: string, already_existed: bool, child_in_skeleton: bool, parent_in_skeleton: bool, child_body_index: int, parent_body_index: int, frames_snapped: bool, collision_disabled: bool, constraint_count: int, saved: bool, save_error?: string, note?: string, constraint: object }

add_static_mesh_simple_collision

Additive

Appends one simple collision element to a UStaticMesh and saves the mesh: a primitive (Box, Sphere or Capsule) sized to the mesh bounds, or a K-DOP hull (NDOP10_X / NDOP10_Y / NDOP10_Z bevel the four edges along that axis, NDOP18 every edge, NDOP26 every edge and corner) fitted around the LOD0 vertices as the Static Mesh Editor's Add K-DOP action does. A mesh outside /Game is first copied to dest_path under /Game, reusing a copy already there (duplicated: this call created it). An unknown shape is an error naming the accepted ones, checked before any copy. Not idempotent: each call adds one more element, existing collision is kept (clear it with remove_static_mesh_collision; convex decomposition is set_static_mesh_convex_collision). A K-DOP subsystem failure, as under PIE, makes success false with collision_changed and the new copy's saved; a failed save makes success false with save_error.

Parameter Type Required Description
static_mesh_path string yes Path to the source UStaticMesh.
dest_path string no Path under /Game to copy a mesh that is not under /Game into before editing (required then; an existing mesh there is reused and edited)
shape string no Box (default), Sphere, Capsule, NDOP10_X, NDOP10_Y, NDOP10_Z, NDOP18 or NDOP26, case-insensitive. Any other value is refused.

Returns: { static_mesh_path, shape, box_count, sphere_count, capsule_count, element_count, collision_added, duplicated_to_game, duplicated, added_index (K-DOP shapes), simple_collision_count (K-DOP shapes), saved, save_error?, collision_changed? }

cluster_geometry_collection

Destructive

Runs auto-clustering on all transforms of a UGeometryCollection asset, targeting site_count clusters ("Small" doubles it, "Large" halves it, any other method keeps it) with connectivity enforced, then saves it. Returns the cluster count used and the transform counts before and after; the call fails when no cluster was added (a collection that is not fractured into several pieces has nothing to group) or when the save fails.

Parameter Type Required Description
geometry_collection_path string yes Full asset path to the UGeometryCollection
cluster_size_method string no Small, Medium, or Large, default Medium
site_count integer no Target cluster count before cluster_size_method scales it, minimum 1, default 10

Returns: { geometry_collection_path: string, cluster_size_method: string, site_count: int, num_transforms_before: int, num_transforms_after: int, success: bool, saved: bool, save_error: string? }

compute_geometry_collection_proximity

Destructive

Rebuilds the proximity (adjacency) graph of a UGeometryCollection asset in place and saves it; undoable. Returns proximity_pairs (unordered pairs of neighboring pieces, from a precise proximity pass), transform_count, success and saved; fails when the save fails. Afterwards get_geometry_collection_hierarchy reports proximity_computed true.

Parameter Type Required Description
geometry_collection_path string yes Asset path of the UGeometryCollection

Returns: { geometry_collection_path: string, proximity_pairs: int, transform_count: int, success: bool, saved: bool }

create_field_system_asset

Additive Idempotent

Create a UFieldSystem asset -- an empty list of Chaos field commands -- at package_path/field_system_name (default folder /Game/MCP), register it with the Asset Registry and save it; no undo step. Idempotent: a field system already at that path is loaded and returned unchanged in the same shape, with saved=false and a message, nothing saved; command_count tells how many commands it already holds. An invalid package name, or a name taken by an asset of another class, is an error; a failed save of the new asset gives success false with saved=false and save_error. field_system_path is the package path (e.g. /Game/MCP/FS_Example). Add commands with add_field_node, read them with get_field_system_info, place the asset in the level with spawn_actor.

Parameter Type Required Description
field_system_name string yes Asset name (e.g. "FS_Example")
package_path string no Optional content folder; defaults to /Game/MCP

Returns: { field_system_path: string, field_system_name: string, command_count: int, success: bool, saved: bool, save_error?: string, message?: string }

create_geometry_collection

Destructive

Creates a UGeometryCollection asset at package_path/name, optionally filled from one StaticMesh, and saves it. An existing collection there is RESET first (all geometry and sources discarded; created false, rebuilt true). A source_mesh_path that does not load as a StaticMesh is an error, checked before anything is touched. Succeeds only when the package reaches disk; a failed save leaves the collection in memory only (saved false, save_error).

Parameter Type Required Description
package_path string yes Content folder for the asset, e.g. /Game/Chaos/Collections; a path without a leading slash is placed under /Game/
name string yes Name of the geometry collection asset, e.g. GC_Wall
source_mesh_path string no Optional StaticMesh to convert and append, e.g. /Engine/BasicShapes/Cube

Returns: { asset_path: string, geometry_collection_name: string, num_materials: int, num_transforms: int, created: bool, rebuilt: bool, saved: bool, save_error: string? }

create_physical_material

Additive Idempotent

Create and save a UPhysicalMaterial asset, optionally setting surface/object properties. Idempotent: if the asset already exists it is loaded, any provided values are re-applied, and a stable payload is returned.

Parameter Type Required Description
name string yes Asset name (e.g. 'PM_Rubber').
package_path string no Target /Game package path (optional, default "/Game/Physics")
friction number no Optional Friction value to set on creation
restitution number no Optional Restitution value to set on creation
density number no Optional Density value (g/cm^3) to set on creation

Returns: { name: string, asset_path: string, package_path: string, friction: number, restitution: number, density: number, already_existed: bool, created: bool }

create_physics_asset

Additive Idempotent

Create a UPhysicsAsset at package_path/name by generating bodies and constraints from a skeletal mesh with the engine's default settings (FPhysicsAssetUtils::CreateFromSkeletalMesh), set that mesh as its preview mesh and save it, with no undo transaction; the mesh itself is not pointed at the new asset (assign_skeletal_mesh_physics_asset does that). Idempotent: a physics asset already at that path is returned unchanged with already_existed=true and saved=false, nothing generated or saved and skeletal_mesh_path not read, while another asset class there is an error before any mesh loads. A generation failure is not an error: the asset is still saved, with bodies_generated=false and generation_message. A failed save, refused while PIE runs, makes success false with save_error. Inspect it with get_physics_asset_info; tune bodies with set_physics_body_properties and joints with add_physics_asset_constraint.

Parameter Type Required Description
name string yes Asset name (e.g. 'PA_Cube').
package_path string no Content folder for the new asset (default /Game/Physics; an empty string also uses it)
skeletal_mesh_path string no Skeletal mesh to generate the bodies from (default /Engine/EngineMeshes/SkeletalCube); read only for a new asset, which fails when it does not load

Returns: { asset_path: string, asset_name: string, package_path: string, body_count: number, constraint_count: number, skeletal_mesh_path: string, bodies: [{ index: number, bone_name: string, object_path: string, primitive_count?: number }], skeleton_bones: [string], constraints: [object], already_existed: bool, created: bool, saved: bool, bodies_generated?: bool, generation_message?: string, save_error?: string, note?: string }

cut_geometry_collection_with_planes

Destructive

Cut every piece of a UGeometryCollection asset with num_planes flat planes placed at random (seeded) inside its bounds, with no noise on the cut surfaces, in one undo step, then save it. The cut pieces stay in the hierarchy as parents of the new ones, so each call adds pieces on top of the earlier ones; it is not idempotent. Choose it for a few long straight cuts (planks, slabs); for a regular grid of cuts use slice_geometry_collection, for organic Voronoi shards fracture_geometry_collection, and to group pieces afterwards cluster_geometry_collection. Make the collection first with create_geometry_collection; check the result with get_geometry_collection_hierarchy or get_geometry_collection_info. new_fracture_count is the number of transforms the cut added; the call fails when it added none (an empty collection, or planes that miss every piece) even though the asset is still saved, and when the save fails (for example while PIE runs). A path that does not load as a geometry collection is an error and nothing changes.

Parameter Type Required Description
geometry_collection_path string yes Asset path of the UGeometryCollection, e.g. "/Game/Destruction/GC_Wall", as create_geometry_collection returns it (asset_path).
num_planes integer no Number of random cutting planes, an integer of at least 1 (smaller values become 1), default 3.
random_seed integer no Integer seed for plane placement, default 1337; the same seed on the same collection gives the same planes.
grout number no Width of the gap left between cut pieces, in cm, e.g. 0.5 (default 0, no gap).
split_islands boolean no true (default) turns every disconnected part of a cut piece into its own piece; false keeps them together.

Returns: { geometry_collection_path: string, num_planes: int, new_fracture_count: int, transform_count: int, success: bool, saved: bool, save_error: string? }

find_scene_overlaps

Read-only

Sphere / box / capsule overlap query against the world: "what is inside this volume?", returning one JSON entry per overlapping actor+component instead of export-text, so no Python is needed to parse it. Use it over raycast_scene when the question is proximity/containment rather than line of sight -- e.g. is the pawn actually inside a water body's real collision, is anything blocking a build spot. Accepts the same world selector (editor / server / client / pie:N): an editor-world query does NOT see World-Partition/OFPA actor collision, so pass a live PIE world, and in co-op say WHICH one or an empty result is uninterpretable.

Parameter Type Required Description
shape string yes "sphere" | "box" | "capsule"
location array yes World-space [x, y, z] shape center
radius number no Sphere/capsule radius (required for those shapes)
half_extent array no Box HALF-extent [x, y, z], not the full size (required for box)
half_height number no Capsule half-height (required for capsule)
trace_channel string no Collision channel, canonical ("ECC_Visibility") or friendly ("Visibility"). Defaults to "Visibility".
ignore_actors array no Actor names/labels to exclude from the overlap.
world string no Which world to query: absent/"editor" (default) | "server" (the PIE world with authority) | "client" | "pie:N" | "pie" (ambiguous) | "game" (alias of "pie"). Pass a live world to hit World-Partition/OFPA actor collision (only cooked in the PIE physics scene).
offset integer no Index of the first entry returned, counted from 0 (default 0). Read the next page at the reply's next_offset.
limit integer no Most entries returned per call, 1..1000 (default 100).

Returns: { overlaps: [{actor_path, actor_name, component_name, item_index, blocking}] (sorted by actor_path, paged with offset/limit), count: int (entries in this page), total: int, offset: int, limit: int, returned: int, truncated: bool, next_offset: int|null, world: string, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

fracture_geometry_collection

Destructive

Applies Voronoi fracturing to all transforms of a UGeometryCollection asset, using num_sites random sites in its bounds, then saves it. num_fractures is the number of new pieces, measured as the transforms the fracture added; the call fails when it added none (an empty collection, or a chance_to_fracture that skipped every piece) or when the save fails. Re-fracturing grows a collection geometrically and can stall the editor; fracture a fresh one from create_geometry_collection.

Parameter Type Required Description
geometry_collection_path string yes Full asset path to the UGeometryCollection
num_sites integer no Number of random Voronoi sites to generate, minimum 1, default 20
random_seed integer no Seed for the random site positions and the per-transform fracture chance, default 0
chance_to_fracture number no Chance from 0 to 1 that each selected transform is fractured, default 1
grout number no Width of the gap left between cut pieces, in cm (default 0)
split_islands boolean no Optional, split resulting islands, default false

Returns: { geometry_collection_path: string, num_fractures: int, transform_count: int, num_sites: int, random_seed: int, success: bool, saved: bool, save_error: string? }

get_actor_bounds

Read-only

Measure how BIG an actor really is: its aggregate world-space bounding box (origin, half-extent, min, max) in the EDITOR world. The size oracle for placement and footprint questions, and the honest test for "did that volume/brush actually get built" -- a spawned volume whose extent comes back (0,0,0) has no geometry no matter what the spawning tool reported. Its components filter is the reason to prefer it over reading a component property: "all" (default, AActor::GetActorBounds -- inflated by interaction/trigger shapes), "colliding" (only collision-enabled components) or "mesh"/"rendered" (UMeshComponent geometry ONLY, so trigger spheres/boxes are excluded and the box hugs what you actually see). Editor world only -- for a PIE-world footprint use find_scene_overlaps/raycast_scene with a world selector.

Parameter Type Required Description
actor_name string yes Actor name or editor label
components string no Which components contribute: "all" (default; everything, trigger shapes included) | "colliding" (collision-enabled only) | "mesh" | "rendered" (UMeshComponent geometry only)
include_child_actors boolean no Include child-actor components' bounds. Defaults to false.

Returns: { actor_name: string, components: string, valid: bool, component_count: int, origin: {x,y,z}, extent: {x,y,z}, min: {x,y,z}, max: {x,y,z} } -- valid=false with a zero extent means no contributing geometry was found

get_collision_info

Read-only

Read ONE placed primitive component's collision setup and physics state: collision enabled mode, per-channel responses (WorldStatic / WorldDynamic / Pawn / PhysicsBody), overlap and hit event flags, simulate-physics, mobility, and the physical material with its friction / restitution / density. The tool to answer "why does this not block / not overlap" without writing Python. Two limits from the code: it searches by component NAME across the world's actors but only inspects each actor's FIRST primitive component, so a secondary component (a second collider, a trigger next to a mesh) reports "not found" even though it exists; and it reads the component's live responses, NOT the profile definition -- for the profile itself use get_collision_profile (which is blind to +EditProfiles overrides), and prove a channel really blocks with raycast_scene.

Parameter Type Required Description
component_name string yes Name of the primitive component to query (must be its actor's first primitive component to be findable).

Returns: { component_name: string, collision_info_found: bool, collision_info_message: string, collision_enabled: string, collision_type: string, collision_response: string, collision_enabled_state: string, collision_generate_overlap_events: bool, collision_generate_hit_events: bool, collision_simulate_physics: bool, collision_mobility: string, collision_response_world_static: string, collision_response_world_dynamic: string, collision_response_pawn: string, collision_response_physics_body: string, physics_material_is_default: bool, physics_material_name: string, physics_material_path: string, physics_material_surface_type: string, physics_material_friction: float, physics_material_restitution: float, physics_material_density: float, physics_material_raise_mass_to_power: float, physics_material_linear_damping: float (body), physics_material_angular_damping: float (body), physics_material_mass_scale: float (body) }

get_field_system_info

Read-only

Read the field commands authored in a UFieldSystem asset, in order: each with physics_type, target_attribute, command_name and max_magnitude (not its node graph), plus command_count. Read-only; the array index is what remove_field_node takes, and add_field_node authors new commands.

Parameter Type Required Description
field_system_path string yes Asset path of the UFieldSystem, e.g. "/Game/MyGame/FS_Example" or "/Game/MyGame/FS_Example.FS_Example".

Returns: { field_system_path: string, command_count: int, commands: [{ physics_type, target_attribute, command_name, max_magnitude }], success: bool }

get_geometry_collection_hierarchy

Read-only

Reads the bone hierarchy of a UGeometryCollection asset: transform_count, root_indices and root_count, and per bone (parallel arrays in transform index order) its level, name, parent index (-1 for a root) and simulation type ("Rigid", "Clustered" or "None"), plus proximity_computed. Generates the Level attribute in memory if needed, without saving. A path that does not load or a collection without geometry data is an error. For damage, mass and source settings use get_geometry_collection_info.

Parameter Type Required Description
geometry_collection_path string yes Asset path of the UGeometryCollection

Returns: { geometry_collection_path: string, transform_count: int, root_indices: [int], root_count: int, levels: [int], bone_names: [string], parents: [int], simulation_types: [string], proximity_computed: bool, success: bool }

get_geometry_collection_info

Read-only

Reads a UGeometryCollection asset without changing it: material, source and damage-threshold counts, damage model ("Threshold", "MaterialStrength" or "Unknown"), mass settings and element counts (transforms, vertices, faces, geometry; 0 without collection data). Use get_geometry_collection_hierarchy for the bone tree.

Parameter Type Required Description
geometry_collection_path string yes Full asset path, e.g. /Game/Chaos/GC_Wall

Returns: { asset_path: string, num_materials: int, num_geometry_sources: int, damage_model: string, num_damage_thresholds: int, is_empty: bool, num_transforms: int, num_vertices: int, num_faces: int, num_geometry: int, mass: float, mass_as_density: bool, minimum_mass_clamp: float, density_from_physics_material: bool, has_physics_material: bool }

get_instanced_static_mesh_instance_info

Read-only

Count the instances in an InstancedStaticMeshComponent, or read one instance's transform (location / rotation / scale) and per-instance custom data floats. Two modes from one call: omit instance_index for COUNT mode (num_instances + num_custom_data_floats -- the oracle for "did my scatter actually place anything"), pass it for per-instance mode. Reads the component in the editor world, so it needs no PIE.

Parameter Type Required Description
actor_name string yes Display label or internal name of the actor carrying the ISM component (required)
component_name string no Optional ISM component name (defaults to the first one on the actor)
instance_index number no Optional; absent -> count mode; present and >=0 -> per-instance mode (must be a valid index)
world_space boolean no Optional; if true, transform is returned in world space (default true)

Returns: count mode { num_instances: int, num_custom_data_floats: int } or instance mode { instance_index: int, num_instances: int, world_space: bool, location: [x,y,z], rotation: [pitch,yaw,roll], scale: [x,y,z], custom_data: [float], num_custom_data_floats: int }

get_physics_asset_info

Read-only

Read a UPhysicsAsset without changing it: body_count and constraint_count; each body's index, bone_name and primitive_count; every constraint with its name, child and parent bones, swing, twist and linear motions and limits, and its drive, breakable and projection settings; skeletal_mesh_path, the asset's preview mesh (empty when none, and not necessarily a mesh that uses the asset); and skeleton_bones, that mesh's bone names, the names body and constraint tools accept. A path that does not load as a physics asset is an error. Edit bodies with set_physics_body_properties, joints with add_physics_asset_constraint, set_physics_asset_constraint_limits or set_physics_asset_constraint_drives; a world constraint actor is get_physics_constraint_info. Add or remove a bone's body: add_physics_asset_body / remove_physics_asset_body.

Parameter Type Required Description
physics_asset_path string yes Path of the UPhysicsAsset, e.g. "/Game/Physics/PA_Hero" or "/Game/Physics/PA_Hero.PA_Hero".

Returns: { asset_path: string, asset_name: string, body_count: number, constraint_count: number, skeletal_mesh_path: string, bodies: [{ index: number, bone_name: string, object_path: string, primitive_count?: number }], skeleton_bones: [string], constraints: [object] }

get_physics_constraint_info

Read-only

Read the full authored configuration of a world APhysicsConstraintActor's UPhysicsConstraintComponent: identity + wired bodies/bones, linear/angular limits (with motion types), linear/angular drives (motors) with targets, breakable thresholds, projection, and collision/dominance flags. Read-only complement of spawn_physics_constraint / set_physics_constraint_limits / set_physics_constraint_drives; returns the serialized template, not live simulation state (no motor torque/broken/force values, which are 0 outside PIE).

Parameter Type Required Description
constraint_actor_name string yes Label/name of the APhysicsConstraintActor.

Returns: { constraint_actor_name: string, constraint_component: string, constraint_actor1?: string, constraint_actor2?: string, constraint_bone1: string, constraint_bone2: string, linear_limit: number, linear_x_motion: string, linear_y_motion: string, linear_z_motion: string, swing1_limit: number, swing1_motion: string, swing2_limit: number, swing2_motion: string, twist_limit: number, twist_motion: string, angular_drive_mode: string, angular_orientation_drive: bool, angular_velocity_drive: bool, angular_drive_spring: number, angular_drive_damping: number, angular_drive_force_limit: number, angular_orientation_target: [number], linear_position_drive: bool, linear_velocity_drive: bool, linear_drive_spring: number, linear_drive_damping: number, linear_drive_force_limit: number, linear_position_target: [number], linear_breakable: bool, linear_break_threshold: number, angular_breakable: bool, angular_break_threshold: number, projection_enabled: bool, projection_linear_alpha: number, projection_angular_alpha: number, projection_linear_tolerance: number, projection_angular_tolerance: number, parent_dominates: bool, disable_collision: bool, found: bool }

get_physics_settings

Read-only

One-shot physics census of the current world: UPhysicsSettings substepping/delta-time values, world gravity_z, and a walk of every actor counting collision-enabled vs disabled, simulating bodies, mobility split and mass totals, plus a heuristic quality label and a recommendations list. Use it for a broad "what is the physics state of this level" sweep instead of hand-writing the actor loop in Python; for ONE component's collision use get_collision_info, and to change gravity use set_world_gravity (this world) or set_project_settings_value (the project default). Read the numbers with three caveats visible in the code: physics_engine is a hardcoded "PhysX" literal (UE5 actually runs Chaos), the walk takes only the FIRST primitive component per actor so multi-component actors are undercounted, and generate_hit_events is always 0 (never populated).

No parameters.

Returns: { physics_settings_found: bool, physics_engine: string (hardcoded "PhysX"), physics_quality: string (heuristic from max_physics_delta_time), max_physics_delta_time, max_substep_delta_time, max_substeps, world_name, world_gravity_z, world_gravity_enabled, per-component counts (collision enabled/disabled, simulating, static/stationary/movable, overlap events), mass totals (only simulating bodies contribute), recommendations: [string], complexity score }

get_scene_bounds

Read-only

How big is the LEVEL: one world-space bounding box aggregated over every level-bounds-relevant actor in the editor world (persistent level plus any loaded streamed levels), or over an explicit subset if you pass actor_names. Use it for map extents / where-is-everything questions; use get_actor_bounds for a single actor. Note it only sees LOADED actors, so on a World-Partition map an unloaded region contributes nothing and the box reads smaller than the map.

Parameter Type Required Description
actor_names array no Optional subset of actor names/labels; omit for every loaded actor in the world

Returns: { valid: bool, origin: {x,y,z}, extent: {x,y,z}, min: {x,y,z}, max: {x,y,z}, actor_count: int }

raycast_scene

Read-only

Line trace / raycast the world and get a REAL JSON hit result -- what actor and component was hit, impact point, normal and distance -- instead of the UE export-text FHitResult blob that call_function on a line-trace UFUNCTION returns, so no Python parsing is needed. Accepts a world selector (editor / server / client / pie:N), which matters twice: an EDITOR-world trace does not hit World-Partition/OFPA actor collision (only cooked in the PIE physics scene) and reads as a clean miss, and in co-op a miss on the client world looks identical to a missing collider -- pass "server" or "pie:N" so a hit:false is interpretable. Also the honest way to prove a custom collision CHANNEL blocks: trace the same segment on a known-good channel (Visibility) and on the new one and compare actor/component/Z/distance, because get_collision_profile does not see +EditProfiles overrides.

Parameter Type Required Description
start array yes World-space [x, y, z] trace start
end array yes World-space [x, y, z] trace end
trace_channel string no Collision channel, canonical ("ECC_Visibility") or friendly ("Visibility", "Camera", or a custom channel name). Defaults to "Visibility". A channel created THIS session is not in the live profile table yet -- restart the editor before trusting a trace on it.
trace_complex boolean no Test against complex (per-poly) collision instead of simple. Defaults to false.
ignore_actors array no Actor names/labels to exclude from the trace.
return_physical_material boolean no Populate physical_material in the result. Defaults to false.
world string no Which world to trace: absent/"editor" (default) | "server" (the PIE world with authority) | "client" | "pie:N" | "pie" (ambiguous: PlayWorld, else the first PIE context) | "game" (alias of "pie"). Editor-world traces do NOT hit World-Partition/OFPA actors, so pass a live world to verify obstacle collision; with 2+ PIE instances prefer "server"/"pie:N".

Returns: { hit: bool, blocking_hit: bool, actor_path: string, actor_name: string, component_name: string, location: {x,y,z}, impact_point: {x,y,z}, normal: {x,y,z}, impact_normal: {x,y,z}, distance: float, bone_name: string, physical_material: string, face_index: int, world: string, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

remove_field_node

Destructive Idempotent

Remove a field command node from a UFieldSystem by index and persist. Inverse of add_field_node: selects the FFieldSystemCommand at the given index in UFieldSystem.Commands, removes it (RemoveAt frees the command's owned RootNode graph), and saves the asset. Idempotent: an out-of-range index is a clean no-op (removed:false, note:"index out of range") so re-running after the node is already gone is safe.

Parameter Type Required Description
field_system_path string yes Asset path of the UFieldSystem (e.g. "/Game/MyGame/FS_Example")
index integer yes Zero-based index of the field command to remove

Returns: { field_system_path: string, removed: bool, removed_index?: int, removed_target?: string, command_count: int, success: bool, saved?: bool, save_error?: string, note?: string }

remove_geometry_collection_source

Destructive

Remove a StaticMesh source reference from an existing geometry collection (inverse of add_geometry_collection_source; drops the GeometrySource entry only, does NOT re-fracture the core geometry)

Parameter Type Required Description
geometry_collection_path string yes Full asset path to the UGeometryCollection
index integer no Optional 0-based index into the GeometrySource array (exactly one of index / source_mesh_path)
source_mesh_path string no Optional asset path of the source mesh to match against SourceGeometryObject (exactly one of index / source_mesh_path)

Returns: { geometry_collection_path: string, removed_index: int, removed_source_object: string, removed: bool, already_absent: bool, num_sources: int, success: bool, saved: bool }

remove_instanced_static_mesh_instance

Destructive

Delete ONE instance from an InstancedStaticMeshComponent by index, or, with all=true, wipe every instance in one call (the component itself stays) -- e.g. to reset a scatter before re-running it. Indices shift after a removal, so remove from the highest index down when deleting several one by one. Re-read num_instances from the reply (or get_instanced_static_mesh_instance_info) as the oracle -- removed:true alone is not proof of the final count.

Parameter Type Required Description
actor_name string yes Display label or internal name of the actor carrying the ISM component (required)
component_name string no Optional ISM component name
instance_index number no Index of the instance to remove (>=0); required unless all is true, ignored when it is
all boolean no Optional bool (default false): remove every instance (ClearInstances) instead of one

Returns: { removed: bool, num_instances: int, component_name: string, all: bool, cleared: bool (all=true only: no instance left), removed_count: int (all=true only) }

remove_physics_asset_body

Destructive

Remove the body of one bone from a UPhysicsAsset (FPhysicsAssetUtils::DestroyBody, as the Physics Asset editor's Delete does): the body goes with every constraint that joins it (constraints_removed) and its entries in the collision table, in one undo step, then the asset is saved. Inverse of add_physics_asset_body; the bodies after it move down one index. Give bone_name (preferred) or body_index. A bone with no body, or an index out of range, is an honest no-op (removed=false, already_absent=true, nothing saved). A failed save makes success false with save_error. Read: get_physics_asset_info.

Parameter Type Required Description
physics_asset_path string yes /Game path to the UPhysicsAsset.
bone_name string no Bone whose body to remove; preferred over body_index when both are given.
body_index integer no Index of the body to remove (get_physics_asset_info lists them), used when bone_name is absent.

Returns: { physics_asset_path: string, bone_name: string, body_index: int, removed: bool, already_absent: bool, constraints_removed: int, body_count: int, constraint_count: int, saved: bool, save_error?: string }

remove_physics_asset_constraint

Destructive Idempotent

Remove a ragdoll constraint (joint) from a UPhysicsAsset — the inverse of add_physics_asset_constraint. Resolves the joint by constraint_name (preferred) or constraint_index and deletes it via FPhysicsAssetUtils::DestroyConstraint (the same ConstraintSetup.RemoveAt the PhAT editor runs). Idempotent: an already-absent constraint returns removed:false/already_absent:true with success (no mutation, no save).

Parameter Type Required Description
physics_asset_path string yes /Game path to the UPhysicsAsset to remove the constraint from.
constraint_name string no Optional joint name (JointName) of the constraint to remove; preferred over constraint_index when both are given (see get_physics_asset_info).
constraint_index integer no Optional constraint index to remove (used when constraint_name is absent).

Returns: { physics_asset_path: string, constraint_name: string, constraint_index: int, child_bone: string, parent_bone: string, removed: bool, already_absent: bool, constraint_count: int, saved: bool, save_error?: string }

remove_static_mesh_collision

Destructive Idempotent

Clear ALL simple/convex collision primitives from a UStaticMesh's BodySetup (the 'clear' half of the collision CRUD). Calls UBodySetup::RemoveSimpleCollision (InvalidatePhysicsData + AggGeom.EmptyElements), rebuilds the physics meshes and saves; a failed save makes success false with save_error. Reuses the same duplicate-first logic as add_static_mesh_simple_collision so a read-only /Engine source is copied into dest_path first (an existing copy there is reused); duplicated is true when this call created that copy. Idempotent: clearing an already-empty BodySetup (or a mesh with no BodySetup) is a no-op reported via already_empty:true, where saved reports only the save of a copy this call created and is false, with nothing saved, when there is none.

Parameter Type Required Description
static_mesh_path string yes Path to the source UStaticMesh.
dest_path string no /Game path to duplicate a read-only /Engine source mesh into first (required only when the source is not under /Game).

Returns: { static_mesh_path, removed_count, element_count, collision_removed, already_empty, duplicated_to_game, duplicated, saved, save_error?, note? }

set_actor_physical_material

Destructive Idempotent

Override the physical material (friction, restitution, surface type) of one placed actor's collision body in the editor world, through UPrimitiveComponent::SetPhysMaterialOverride on a single component: the StaticMeshComponent of a StaticMeshActor, otherwise the actor's first primitive component. One undo step; the level is marked dirty but not saved (save_level), and neither the mesh asset nor other actors change. verified is true when the override read back from the component's body is that material. Create the material with create_physical_material; for another component of the actor set its BodyInstance through set_component_property; read the actor's components with get_actor_components. Idempotent: the same material again changes nothing new. There is no way to clear the override here. A missing actor, an actor with no primitive component, or a path that does not load as a UPhysicalMaterial is an error and nothing changes.

Parameter Type Required Description
actor_name string yes Editor label or object name of an actor in the editor world (not PIE), e.g. "Floor_01".
physical_material_path string yes Asset path of the UPhysicalMaterial, e.g. "/Game/Physics/PM_Ice", as create_physical_material returns it (asset_path).

Returns: { actor_name: string, component_name: string, physical_material_path: string, physical_material_name: string, applied_material_name?: string, verified: bool, applied: bool }

set_geometry_collection_damage

Destructive Idempotent

Set the damage model and/or the per-level damage thresholds of a UGeometryCollection asset in an undo transaction, then save it. Only the fields given change; damage_thresholds overwrites the whole threshold list, skipping entries that are not numbers. Succeeds only when the package reaches disk; a failed save leaves the change in memory only (saved false, save_error). The reply reads back damage_model ("Threshold", "MaterialStrength" or "Unknown") and num_thresholds; get_geometry_collection_info shows them later. Mass: set_geometry_collection_mass; clustering: set_properties (ClusterConnectionType, EnableClustering...).

Parameter Type Required Description
geometry_collection_path string yes Full asset path to the UGeometryCollection
damage_model string no Threshold (alias UserDefined) or Simple (alias Material, the material-strength model), case-insensitive; any other text means Threshold, and leaving it out keeps the current model.
damage_thresholds array no Optional array of per-level damage threshold floats

Returns: { geometry_collection_path: string, damage_model: string, num_thresholds: int, success: bool, saved: bool, save_error: string? }

set_geometry_collection_mass

Destructive Idempotent

Writes the mass settings of a UGeometryCollection asset (mass, mass_as_density, minimum_mass_clamp, density_from_physics_material), only for the fields given, then saves it; undoable. Returns the four values as stored, success, saved; fails when the save fails. Read them back with get_geometry_collection_info.

Parameter Type Required Description
geometry_collection_path string yes Full asset path to the UGeometryCollection
mass number no Optional total mass (kg), or density (kg/m^3) when mass_as_density is true
mass_as_density boolean no Optional, interpret 'mass' as a density in kg/m^3, default unchanged
minimum_mass_clamp number no Optional smallest allowable mass, default unchanged
density_from_physics_material boolean no Optional, derive density from the physics material, default unchanged

Returns: { geometry_collection_path: string, mass: float, mass_as_density: bool, minimum_mass_clamp: float, density_from_physics_material: bool, success: bool, saved: bool }

set_instanced_static_mesh_instance_transform

Destructive Idempotent

Move, rotate or rescale ONE existing instance of an InstancedStaticMeshComponent in place, by index -- cheaper than remove + re-add and it keeps the index stable. Leave mark_render_state_dirty at its default true or the viewport keeps drawing the old transform.

Parameter Type Required Description
actor_name string yes Display label or internal name of the actor carrying the ISM component (required)
instance_index number yes Index of the instance to update (required, >=0)
component_name string no Optional ISM component name
location array no [x, y, z] new translation
rotation array no Optional [pitch, yaw, roll]
scale array no Optional [x, y, z]
world_space boolean no Optional; defaults true
mark_render_state_dirty boolean no Optional; default true (engine signature bMarkRenderStateDirty=true)
teleport boolean no Optional; default false

Returns: { updated: bool, num_instances: int }

set_physics_asset_constraint_drives

Destructive Idempotent

Set a UPhysicsAsset constraint's drives (linear + angular motors), breakable thresholds, and projection — the "behavior beyond limits" (read-modify-write; only provided fields change; idempotent set-to-fixed-value). Authoring-only: the values persist into the asset (the live motor effect is observed in PIE/sim).

Parameter Type Required Description
physics_asset_path string yes /Game path to the UPhysicsAsset.
constraint_name string yes Name (JointName) of the constraint to edit (see get_physics_asset_info).
angular_drive_mode string no Optional angular drive mode: SLERP|TwistAndSwing.
angular_orientation_drive boolean no Optional: enable the angular orientation (position) drive.
angular_velocity_drive boolean no Optional: enable the angular velocity drive.
angular_drive_spring number no Optional angular drive spring/stiffness.
angular_drive_damping number no Optional angular drive damping.
angular_drive_force_limit number no Optional angular drive force/torque limit (0 = unlimited).
angular_orientation_target array no Optional [pitch, yaw, roll] target orientation in degrees.
linear_position_drive boolean no Optional: enable the linear position drive (applied to all 3 axes).
linear_velocity_drive boolean no Optional: enable the linear velocity drive (all 3 axes).
linear_drive_spring number no Optional linear drive spring/stiffness.
linear_drive_damping number no Optional linear drive damping.
linear_drive_force_limit number no Optional linear drive force limit (0 = unlimited).
linear_position_target array no Optional [x, y, z] target position.
linear_breakable boolean no Optional: the joint can break under linear force.
linear_break_threshold number no Optional linear break force threshold.
angular_breakable boolean no Optional: the joint can break under angular force.
angular_break_threshold number no Optional angular break torque threshold.
projection_enabled boolean no Optional: enable projection (post-solve position/angle fixup).
projection_linear_tolerance number no Optional projection linear tolerance.
projection_angular_tolerance number no Optional projection angular tolerance in degrees.
projection_linear_alpha number no Optional semi-physical linear projection alpha [0..1].
projection_angular_alpha number no Optional semi-physical angular projection alpha [0..1].
parent_dominates boolean no Optional: the parent body is unaffected by the child's motion.

Returns: { physics_asset_path: string, constraint_name: string, constraint_index: int, applied_count: int, angular_drive_spring: float, angular_drive_damping: float, angular_drive_force_limit: float, angular_orientation_target: [float], linear_drive_spring: float, linear_drive_damping: float, linear_drive_force_limit: float, linear_position_target: [float], projection_linear_alpha: float, projection_angular_alpha: float, projection_linear_tolerance: float, projection_angular_tolerance: float, saved: bool, save_error?: string, constraint: object }

set_physics_asset_constraint_limits

Destructive Idempotent

Set the linear/angular motion types and limits of an existing constraint inside a UPhysicsAsset (read-modify-write: only the axes you provide change). Angular limits are in degrees; the linear limit is a single value shared across X/Y/Z (cm). Each *_motion is Free|Limited|Locked; providing a *_limit without its motion implies Limited on that axis. Idempotent (set-to-fixed-value).

Parameter Type Required Description
physics_asset_path string yes /Game path to the UPhysicsAsset.
constraint_name string yes Name (JointName) of the constraint to edit (see get_physics_asset_info).
swing1_motion string no Optional cone swing1 motion: Free|Limited|Locked.
swing1_limit number no Optional cone swing1 limit in degrees.
swing2_motion string no Optional cone swing2 motion: Free|Limited|Locked.
swing2_limit number no Optional cone swing2 limit in degrees.
twist_motion string no Optional twist motion: Free|Limited|Locked.
twist_limit number no Optional twist limit in degrees.
linear_x_motion string no Optional linear X-axis motion: Free|Limited|Locked.
linear_y_motion string no Optional linear Y-axis motion: Free|Limited|Locked.
linear_z_motion string no Optional linear Z-axis motion: Free|Limited|Locked.
linear_limit number no Optional shared linear limit in cm (applied to all 3 axes).

Returns: { physics_asset_path: string, constraint_name: string, constraint_index: int, applied_count: int, saved: bool, save_error?: string, constraint: object }

set_physics_body_properties

Destructive Idempotent

Set the physics type, a mass override and/or the advanced FBodyInstance fields (damping, mass scale, inertia scale, centre-of-mass nudge, gravity, mass update on scale) of one body of a UPhysicsAsset, chosen by body_index or else bone_name, then save the asset. Use it rather than set_properties, which needs the body setup's object path and the nested DefaultInstance struct: this picks the body by bone, goes through the engine setters for mass (which also switches the override on), mass scale and gravity, and saves. Only the fields you pass change; passing none is an error and nothing is written. An asset with no bodies, no body found, an unknown physics_type, a mass_scale below 0.001 or a vector that is not 3 numbers is an error, checked before any write. Every field is read back from the authored body (not the live physics actor, which is absent headless). success is false, with save_error, when the save fails (during PIE, for one).

Parameter Type Required Description
physics_asset_path string yes /Game path to the UPhysicsAsset.
body_index integer no 0-based index of the body in the asset; wins over bone_name when both are given
bone_name string no Bone whose body to configure, used when body_index is absent
physics_type string no Body physics type (Default|Kinematic|Simulated), case-insensitive; omit to keep the current one
mass number no Mass override in kilograms; also switches the mass override on. Omit to keep the current mass
linear_damping number no Optional. Drag that slows linear movement (FBodyInstance LinearDamping, unitless, engine default 0.01); omit to keep the current value
angular_damping number no Optional. Drag that slows rotation (FBodyInstance AngularDamping, unitless, engine default 0); omit to keep the current value
mass_scale number no Optional. Per-instance mass multiplier, >= 0.001
inertia_tensor_scale array no Optional. [x,y,z] inertia scale
com_nudge array no Optional. [x,y,z] centre-of-mass offset
enable_gravity boolean no Optional. Whether the body is affected by gravity
update_mass_when_scale_changes boolean no Optional. Recompute mass on scale change

Returns: { physics_asset_path, body_index, bone_name, physics_type, physics_type_applied, mass_override_enabled, mass, mass_applied, linear_damping, angular_damping, mass_scale, inertia_tensor_scale: [x,y,z], com_nudge: [x,y,z], enable_gravity, update_mass_when_scale_changes, applied_count (fields written by this call), updated, saved, save_error }

set_physics_constraint_drives

Destructive Idempotent

Set linear/angular drives (motors), breakable thresholds, projection, and collision/dominance on a world APhysicsConstraintActor's UPhysicsConstraintComponent — the "behavior beyond limits" (read-modify-write; only provided fields change; idempotent set-to-fixed-value). Authoring-only: the values are written into the component's serialized ConstraintInstance template and persist; the live motor torque is only applied while simulating (PIE). Distinct from the UPhysicsAsset constraint drives (set_physics_asset_constraint_drives), which author a ragdoll joint inside an asset.

Parameter Type Required Description
constraint_actor_name string yes Label/name of the APhysicsConstraintActor (as spawned by spawn_physics_constraint).
angular_drive_mode string no Optional angular drive mode: SLERP|TwistAndSwing (dispatches the orientation/velocity enable path).
angular_orientation_drive boolean no Optional: enable the angular orientation (position) drive.
angular_velocity_drive boolean no Optional: enable the angular velocity drive.
angular_drive_spring number no Optional angular drive spring/stiffness.
angular_drive_damping number no Optional angular drive damping.
angular_drive_force_limit number no Optional angular drive force/torque limit (0 = unlimited).
angular_orientation_target array no Optional [pitch, yaw, roll] target orientation in degrees.
linear_position_drive boolean no Optional: enable the linear position drive (applied to all 3 axes).
linear_velocity_drive boolean no Optional: enable the linear velocity drive (all 3 axes).
linear_drive_spring number no Optional linear drive spring/stiffness.
linear_drive_damping number no Optional linear drive damping.
linear_drive_force_limit number no Optional linear drive force limit (0 = unlimited).
linear_position_target array no Optional [x, y, z] target position.
linear_breakable boolean no Optional: the joint can break under linear force.
linear_break_threshold number no Optional linear break force threshold.
angular_breakable boolean no Optional: the joint can break under angular force.
angular_break_threshold number no Optional angular break torque threshold.
projection_enabled boolean no Optional: enable projection (post-solve position/angle fixup).
projection_linear_tolerance number no Optional projection linear tolerance.
projection_angular_tolerance number no Optional projection angular tolerance in degrees.
projection_linear_alpha number no Optional semi-physical linear projection alpha [0..1].
projection_angular_alpha number no Optional semi-physical angular projection alpha [0..1].
parent_dominates boolean no Optional: the parent body is unaffected by the child's motion.
disable_collision boolean no Optional: disable collision between the two constrained bodies.
break_constraint boolean no Optional: if true, immediately break the (live) constraint via BreakConstraint().

Returns: { constraint_actor_name: string, constraint_component: string, applied_count: int, angular_drive_mode: string, angular_orientation_drive: bool, angular_velocity_drive: bool, angular_drive_spring: number, angular_drive_damping: number, angular_drive_force_limit: number, angular_orientation_target: [number], linear_position_drive: bool, linear_velocity_drive: bool, linear_drive_spring: number, linear_drive_damping: number, linear_drive_force_limit: number, linear_position_target: [number], linear_breakable: bool, linear_break_threshold: number, angular_breakable: bool, angular_break_threshold: number, projection_enabled: bool, projection_linear_alpha: number, projection_angular_alpha: number, projection_linear_tolerance: number, projection_angular_tolerance: number, parent_dominates: bool, disable_collision: bool, constraint_broken: bool, note: string, updated: bool }

set_physics_constraint_limits

Destructive Idempotent

Sets the motion limits of a Physics Constraint actor placed in the editor world, on its UPhysicsConstraintComponent, and reads them back: each limit given switches that axis to Limited with that size (linear_limit is one value for X, Y and Z together; swing and twist are in degrees). Axes whose limit is not given keep their motion type and size, and no axis can be set to Free or Locked here. One undo step; the level is marked dirty, not saved (save_level). The same values again give the same result. updated is read back: every limit given reads Limited with the requested size, and one that does not makes success false. A call with no limit is an error that names the four limit parameters, and nothing changes; so is an actor that is not a Physics Constraint actor. Create one with spawn_physics_constraint and read it with get_physics_constraint_info; motors, breaking and projection are set with set_physics_constraint_drives; for a ragdoll joint inside a Physics Asset use set_physics_asset_constraint_limits instead.

Parameter Type Required Description
constraint_actor_name string yes Label or object name of the APhysicsConstraintActor in the editor world (case-insensitive), as spawn_physics_constraint returns it.
linear_limit number no Optional linear limit in cm, applied to all 3 axes together (e.g. 10); not range-checked.
swing1_limit number no Optional swing1 angular limit in degrees, the first symmetric angle of the swing cone (e.g. 45); the Details panel range is 0-180 and this value is not range-checked.
swing2_limit number no Optional swing2 angular limit in degrees, the second symmetric angle of the swing cone (e.g. 45); the Details panel range is 0-180 and this value is not range-checked.
twist_limit number no Optional twist angular limit in degrees, the symmetric rotation about the twist axis (e.g. 30); the Details panel range is 0-180 and this value is not range-checked.

Returns: { constraint_actor_name: string, constraint_component: string, linear_limit: number, linear_x_motion: string, linear_y_motion: string, linear_z_motion: string, swing1_limit: number, swing1_motion: string, swing2_limit: number, swing2_motion: string, twist_limit: number, twist_motion: string, linear_applied: bool, swing1_applied: bool, swing2_applied: bool, twist_applied: bool, updated: bool } -- updated is true when every limit given reads back Limited with the requested size

set_static_mesh_convex_collision

Destructive Idempotent

Replace the simple collision of a UStaticMesh asset, found by path, with a V-HACD convex decomposition, as the Static Mesh Editor's Auto Convex Collision does, in one undo step, then save it; re-running replaces the hulls, never adds to them. hull_count and hull_precision must be positive, checked before anything is copied. A mesh outside /Game is first copied to dest_path under /Game, reusing a copy already there; duplicated says this call created it. When the subsystem fails (no mesh description, no LOD 0 geometry with collision enabled, a PIE session), success is false: collision_changed says whether it had already cleared the old collision, left unsaved and undoable, and saved whether a new copy was saved. A failed save makes success false with save_error. Box, sphere, capsule or K-DOP hull: add_static_mesh_simple_collision; clear: remove_static_mesh_collision.

Parameter Type Required Description
static_mesh_path string yes Path to the source UStaticMesh.
dest_path string no /Game path to duplicate a read-only /Engine source mesh into first (required only when the source is not under /Game).
hull_count number no Maximum number of convex pieces to create (default 4, must be positive).
max_hull_verts number no Maximum vertices per generated hull (default 16).
hull_precision number no Voxel resolution used during decomposition (default 100000, must be positive).

Returns: { static_mesh_path, hull_count, max_hull_verts, hull_precision, convex_count, element_count, collision_set, duplicated_to_game, duplicated, saved, save_error?, collision_changed? }

set_vehicle_wheel_setup

Destructive Idempotent

Configure ONE entry of a UChaosWheeledVehicleMovementComponent's WheelSetups array (wheel class, bone, offset) by index. USE THIS RATHER THAN the generic set_properties, which cannot reliably write the wheel class: it is a TSubclassOf nested in a struct nested in an array, and the generic path only FINDS an already-loaded class instead of loading it. This tool resolves the class explicitly and writes the whole struct element, growing the array to fit if wheel_index is past the end. READING them back needs no special tool -- the generic get_properties already resolves nested object refs correctly.

Parameter Type Required Description
actor_name string yes Editor-world actor with a UChaosWheeledVehicleMovementComponent
wheel_index number yes Index into WheelSetups (>= 0). The array grows to fit if this is past the current end.
wheel_class string yes Full class path of the UChaosVehicleWheel subclass, e.g. "/Script/ChaosVehicles.ChaosVehicleWheel"
bone_name string no Skeletal bone this wheel is attached to. Optional.
additional_offset array no [x, y, z] additional offset applied to the wheel. Optional.

Returns: { actor_name: string, wheel_index: int, wheel_class: string, bone_name: string, additional_offset: {x,y,z}, num_wheels: int }

slice_geometry_collection

Destructive

Slices all transforms of a UGeometryCollection asset with a regular grid of slices_x by slices_y by slices_z cuts across its bounds (no angle or offset variation, islands split), then saves it. new_fracture_count is the number of new pieces, measured as the transforms the slicing added; the call fails when it added none (an empty collection, or all three slice counts 0) or when the save fails.

Parameter Type Required Description
geometry_collection_path string yes Asset path of the UGeometryCollection
slices_x integer no Number of evenly spaced X slices, default 2
slices_y integer no Number of evenly spaced Y slices, default 2
slices_z integer no Number of evenly spaced Z slices, default 1
random_seed integer no Seed passed to the slicer, default 1337; angle and offset variation are fixed at 0, so it changes little
grout number no Width of the gap left between cut pieces, in cm (default 0)

Returns: { geometry_collection_path: string, slices_x: int, slices_y: int, slices_z: int, new_fracture_count: int, transform_count: int, success: bool, saved: bool, save_error: string? }

spawn_physics_constraint

Additive

Spawns an APhysicsConstraintActor in the editor world at location (zero rotation) in an undo transaction and optionally sets the two actors it constrains, found by object name or label (first match), then recomputes the joint frames; spawn_actor has no constraint type. A name that matches no actor is skipped, not an error: check actor1_wired and actor2_wired. Each call adds a new actor; the level is not saved. Tune it with set_physics_constraint_limits and set_physics_constraint_drives, read it with get_physics_constraint_info; for joints inside a Physics Asset use add_physics_asset_constraint.

Parameter Type Required Description
location array no World [x, y, z] for the constraint actor (defaults to origin)
actor1_name string no Optional name/label of the first actor to constrain
actor2_name string no Optional name/label of the second actor to constrain

Returns: { actor_name: string, actor_internal_name: string, actor_class: string, constraint_component: string, actor1_wired: bool, actor2_wired: bool, constraint_actor1?: string, constraint_actor2?: string, spawned: bool }