Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · physics

RigidBody

Rigid-body authoring settings; simulation state is written to pose and velocity.

Fields

Static, kinematic, or dynamic motion.
default "static"

One ofstatickinematicdynamic

mass

f32
Mass in kilograms; zero computes mass from the collider's 1000 kg/m3 density.
default 0kg≥ 0

allowSleep

bool
Permit inactive bodies to sleep.
default true

continuous

bool
Use 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.