Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · gameplay

FollowCamera

Third-person orbit rig: places this entity behind target, steered by Look.

Fields

target

option<entity>
Followed entity.
default null

distance

f32
Orbit distance from the aim point; the boom stops in front of static box colliders.
default 5m≥ 0.1

height

f32
Aim point height above the target's origin.
default 0.8m

yaw

f32
Orbit yaw; 0 looks along +Z. Simulation state driven by Look.
default 0deg

pitch

f32
Orbit pitch above the horizon; simulation state driven by Look.
default 20deg-80 – 80

sensitivity

f32
Look sensitivity: degrees per tick at full axis deflection.
default 2.5deg≥ 0

player

u64
Input owner whose Look action steers the rig.
default 1

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=FollowCamera --why "Add FollowCamera"

Set a field

ara do property.set -p entity=name:Crate -p path=FollowCamera.target -p value=null --why "Tune FollowCamera"

In a scene document

{
  "FollowCamera": {
    "target": null
  }
}

From C#

/// <summary>Pull a following camera back for a vehicle.</summary>
public static void UseFollowCamera(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<FollowCamera>(entity);
    component.Distance = 6f;
}

From C#

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