GameTransform is the transform accessor attached to every GameObject. You reach it through GameObject.Transform or the Transform shortcut property on any Component.
It exposes two coordinate spaces:
- World space — absolute position, rotation, and scale relative to the scene origin.
- Local space — position, rotation, and scale relative to the parent
GameObject.
World space
The full world-space transform. Reading is cached and invalidated automatically when the transform changes. Writing recalculates the local transform to produce the desired world result.
On
Component, use WorldTransform, WorldPosition, WorldRotation, and WorldScale as shortcuts that read and write through GameObject.Transform.World.Local space
The full local-space transform — position, rotation, and scale relative to the parent
GameObject. If the object has no meaningful parent (it is parented directly to the scene), local and world transforms are equivalent.The current interpolated local transform. During fixed update, this smoothly moves toward the target transform rather than snapping. Read-only — set
Local or World to change the transform.Understanding world vs local space
Local space values are always relative to the parent. If a parent object moves, all children follow automatically.SetParent( newParent, keepWorldPosition: true ), the world position stays fixed and the local transform is recalculated. With keepWorldPosition: false, the local transform stays and the object moves to its new position in the world.
Interpolation
When aGameObject’s transform is changed inside OnFixedUpdate, the engine smoothly interpolates it each render frame so movement appears fluid even at low physics rates. This is automatic and requires no extra code.
ClearInterpolation
Helper methods
LerpTo
target by fraction frac (0 = no movement, 1 = snap to target). Useful for smooth camera or object following.