Component · physics
VehicleInput
Replayable driver intent consumed every fixed tick.
Fields
throttle
f32Signed accelerator, with negative input selecting reverse.
default 0-1 – 1replicated · owner, rollback
steer
f32Signed steering, positive turns right.
default 0-1 – 1replicated · owner, rollback
brake
f32Service brake.
default 00 – 1replicated · owner, rollback
handBrake
f32Rear-wheel handbrake.
default 00 – 1replicated · 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=VehicleInput --why "Add VehicleInput"Set a field
ara do property.set -p entity=name:Crate -p path=VehicleInput.throttle -p value=0 --why "Tune VehicleInput"In a scene document
{
"VehicleInput": {
"throttle": 0
}
}From C#
/// <summary>Apply half throttle this fixed tick.</summary>
public static void UseVehicleInput(Entity entity, in Tick tick)
{
ref var component = ref World.Get<VehicleInput>(entity);
component.Throttle = 0.5f;
}From C#
Scripts read and write it with Get<VehicleInput>(); see the VehicleInput struct.