Component · physics
RigidBody
Rigid-body authoring settings; simulation state is written to pose and velocity.
Fields
motion
MotionTypeStatic, kinematic, or dynamic motion.
default "static"
One ofstatickinematicdynamic
mass
f32Mass in kilograms; zero computes mass from the collider's 1000 kg/m3 density.
default 0kg≥ 0
allowSleep
boolPermit inactive bodies to sleep.
default true
continuous
boolUse swept collision detection for fast bodies.
default false
Usage
Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.
Add it
ara do component.add -p entity=name:Crate -p component=RigidBody --why "Add RigidBody"Set a field
ara do property.set -p entity=name:Crate -p path=RigidBody.motion -p value="static" --why "Tune RigidBody"In a scene document
{
"RigidBody": {
"motion": "static"
}
}From C#
/// <summary>Give a salvage crate a heavier physical mass.</summary>
public static void UseRigidBody(Entity entity, in Tick tick)
{
ref var component = ref World.Get<RigidBody>(entity);
component.Mass = 20f;
}From C#
Scripts read and write it with Get<RigidBody>(); see the RigidBody struct.