Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · core

Transform

Position, rotation and scale of an entity relative to its parent.

Fields

position

vec3
Position relative to the parent.
default [0,0,0]mreplicated · relevant, linear, rollback

rotation

vec3
Rotation relative to the parent, as XYZ Euler angles.
default [0,0,0]degreplicated · relevant, slerp, rollback

scale

vec3
Scale relative to the parent; [1, 1, 1] is unscaled.
default [1,1,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=Transform --why "Add Transform"

Set a field

ara do property.set -p entity=name:Crate -p path=Transform.position -p value=[0,1,0] --why "Tune Transform"

In a scene document

{
  "Transform": {
    "position": [
      0,
      1,
      0
    ]
  }
}

From C#

/// <summary>Move an entity upwards at one metre per second.</summary>
public static void UseTransform(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<Transform>(entity);
    component.Position += new Vector3(0, tick.Dt, 0);
}

From C#

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