Scene Graph Transforms
A transform is an entity's position, rotation and scale in the world. Read and set it to place, turn or size an entity — the spatial state every entity carries.
Every entity in your scene — a chest, a platform, a tree — quietly carries a transform. It's just three things: where it sits, which way it faces, and how big it is.
Think of it like a spawn blueprint: position, rotation, and scale stamped onto each instance. Read that transform to find an entity, change it to actually move the entity in the world.
First we read the entity's global transform into Current. Then we pull its Translation — the world position — and print the X, Y, Z. Last, we set it: TeleportTo a new spot two hundred units higher, and the entity lifts up.
A transform is the spatial state every entity has. Read it to know where things are, set it to place, turn, or resize them.
Current : transform = Entity.GetGlobalTransform()
Pos : vector3 = Current.Translation
Print("{Pos.X}, {Pos.Y}, {Pos.Z}")
if (Entity.TeleportTo[Pos + vector3{Z := 200.0}]):
Print("moved up!")
Build your own lesson with scene_graph_transforms
Generate a personalized, compile-checked lesson grounded in this exact reference.
Build a lesson →