physics
Physics assets, ragdoll, and Chaos vehicle wheel and suspension setup.
What it’s for
This namespace configures physics simulation on the assets and actors already in your project: creating a PhysicsAsset for a skeletal mesh, toggling ragdoll on a placed actor, and setting up vehicle-style wheels, engine, and transmission. You describe the outcome in plain language and the assistant runs the right operation instead of you hand-editing a PhysicsAsset in the editor.
Reach for it when you want a skeletal mesh to have collision bodies and constraints, when you want a character to go limp under physics on death or impact, or when you are wiring up a Chaos vehicle and need its wheels and drivetrain configured.
Use physics for simulation state on skeletal meshes, placed actors, and vehicle actors.
For lower-level skeleton, bone, constraint, or retarget authoring, use the skeleton
namespace instead.
Examples
Give a skeletal mesh a physics asset
Create a PhysicsAsset for a character mesh and assign it back to the mesh in one step.
You: Create a physics asset for SK_Mannequin and assign it to the mesh.
call("physics.setup_physics_simulation", {meshPath:"/Game/Characters/SK_Mannequin",
physicsAssetName:"PHYS_Mannequin", assignToMesh:true})
→ {ok:true, physicsAsset:"/Game/Physics/PHYS_Mannequin"}
Done. Created PHYS_Mannequin and assigned it to SK_Mannequin.
Make a character go ragdoll
Enable ragdoll on a placed actor, then flip it on so the mesh falls under physics.
You: Turn EnemyGuard into a ragdoll and activate it.
call("physics.setup_ragdoll", {actorName:"EnemyGuard", blendWeight:1.0})
→ {ok:true}
call("physics.activate_ragdoll", {actorName:"EnemyGuard", activate:true})
→ {ok:true, active:true}
Done. EnemyGuard is now simulating as a ragdoll.
Configure a Chaos vehicle
Set the vehicle type, wheels, and drivetrain on a placed car actor.
You: Set up BP_SportsCar as a 4-wheel car with a 7000 RPM engine.
call("physics.configure_vehicle", {vehicleName:"BP_SportsCar", vehicleType:"car",
wheels:[{}, {}, {}, {}], engine:{maxRPM:7000},
transmission:{gears:6, finalDriveRatio:3.5}})
→ {ok:true, wheels:4}
Done. BP_SportsCar configured as a 4-wheel car.