Component · render
Camera
A viewpoint looking along the entity's local -Z axis. The lowest
priority wins.Fields
fov
f32Vertical field of view.
default 55deg1 – 170
priority
i32Selection order when several cameras exist; lower is preferred.
default 0
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=Camera --why "Add Camera"Set a field
ara do property.set -p entity=name:Crate -p path=Camera.fov -p value=55 --why "Tune Camera"In a scene document
{
"Camera": {
"fov": 55
}
}From C#
/// <summary>Widen the field of view while sprinting.</summary>
public static void UseCamera(Entity entity, in Tick tick)
{
ref var component = ref World.Get<Camera>(entity);
component.Fov = 75f;
}From C#
Scripts read and write it with Get<Camera>(); see the Camera struct.