Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · physics

VehicleTelemetry

Vehicle drivetrain and suspension state mirrored into ECS after each tick.

Fields

wheelsInContact

u32
Grounded wheel count.
default 00 – 4replicated · relevant, rollback

engineRpm

f32
Current engine speed in revolutions per minute.
default 0≥ 0replicated · relevant, rollback

gear

i32
Gear index (negative is reverse).
default 0replicated · relevant, 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=VehicleTelemetry --why "Add VehicleTelemetry"

Set a field

ara do property.set -p entity=name:Crate -p path=VehicleTelemetry.wheelsInContact -p value=0 --why "Tune VehicleTelemetry"

In a scene document

{
  "VehicleTelemetry": {
    "wheelsInContact": 0
  }
}

From C#

/// <summary>Restore an idling engine telemetry sample.</summary>
public static void UseVehicleTelemetry(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<VehicleTelemetry>(entity);
    component.EngineRpm = 1200f;
}

From C#

Scripts read and write it with Get<VehicleTelemetry>(); see the VehicleTelemetry struct.