Skip to content
Konjure / spatial intelligence

Transform

← Builtin reference

Local pose and scale for an entity.

Signature

type Transform {
  position: Vec3 = Vec3 {};
  rotation: Vec3 = Vec3 {};
  scale: Vec3 = Vec3 { x: 1, y: 1, z: 1 };
}

Position is meters, rotation is XYZ Euler radians, and scale defaults to one on every axis. Physics owns the position and rotation of dynamic bodies.

Fields

position: Vec3
Translation in meters; defaults to the local origin.
DefaultVec3 {}
rotation: Vec3
XYZ Euler rotation in radians; defaults to zero rotation.
DefaultVec3 {}
scale: Vec3
Per-axis multiplier; defaults to (1, 1, 1). Physical spheres require uniform positive scale.
DefaultVec3 { x: 1, y: 1, z: 1 }

Examples

Set a pose

Create a transform value in meters.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
2

Attach a renderable pose

A scene adapter reads Transform from an entity with geometry.

Tick 0 · 0.00 sThis device
main.kj⌘ / Ctrl + Enter
Loading…Drag to orbit · select to inspect
0 entities
Loading the language runtime…
Output 0
No output.
Expected output
1

Rust definition

Interpreter RecordValue schema consumed by spatial adapters.

See also