-
Notifications
You must be signed in to change notification settings - Fork 5
Component Transform
Berke edited this page Jun 23, 2026
·
1 revision
The Transform component defines an entity’s position, scale, orientation, and spatial state in world space.
t.isValidReturns whether the transform is valid.
booleant.positionWorld position of the entity.
[WARNING]: y and z fields are swapped. So t.position.z = World Y, t.position.y = World Z
Vector3t.position = Vector3(10, 0, 5)t.scaleLocal scale of the entity.
[WARNING]: y and z fields are swapped. So t.scale.z = World Y, t.scale.y = World Z
Vector3t.relativeHeightHeight offset relative to the sector/floor system.
numbert.forwardForward direction vector.
Vector3t.sectorIndexIndex of the sector the entity belongs to.
numbert.isDirtyMarks whether the transform needs recalculation.
booleant:addPosition(offset)Adds a positional offset to the current transform.
| Name | Type | Description |
|---|---|---|
| offset | Vector3 | Movement offset |
nilt:addPosition(Vector3(1, 0, 0))local t = entity.transform
t.position = Vector3(0, 5, 0)
t:addPosition(Vector3(1, 0, 0))