Component · physics
CharacterMotion
Character support and stance mirrored at every fixed boundary.
Fields
grounded
boolWalkable ground support.
default falsereplicated · owner, rollback
crouched
boolActual stance; a ceiling can prevent standing.
default falsereplicated · owner, rollback
groundVelocity
vec3Platform contact velocity.
default [0,0,0]m/sreplicated · owner, rollback
groundNormal
vec3Supporting surface normal.
default [0,0,0]replicated · owner, rollback
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=CharacterMotion --why "Add CharacterMotion"Set a field
ara do property.set -p entity=name:Crate -p path=CharacterMotion.grounded -p value=false --why "Tune CharacterMotion"In a scene document
{
"CharacterMotion": {
"grounded": false
}
}From C#
/// <summary>Restore grounded state when resetting a character on the floor.</summary>
public static void UseCharacterMotion(Entity entity, in Tick tick)
{
ref var component = ref World.Get<CharacterMotion>(entity);
component.Grounded = true;
}From C#
Scripts read and write it with Get<CharacterMotion>(); see the CharacterMotion struct.