Docs

Transform

Position, rotation, and scale of an entity, plus the world values and matrices the scene derives from them. Every Object has one. In Lua, get it with object:getTransform().

Properties

Writing a component field

Some fields take effect only once the matching needUpdate… flag is set too. See Writing components directly.

Name Languages
position C++ | Lua
rotation C++ | Lua
scale C++ | Lua
worldPosition C++ | Lua (read-only)
worldRotation C++ | Lua (read-only)
worldScale C++ | Lua (read-only)
localMatrix C++ | Lua (read-only)
modelMatrix C++ | Lua (read-only)
visible C++ | Lua
visibleInHierarchy C++ | Lua (read-only)
parent C++ | Lua (read-only)
distanceToCamera C++ | Lua (read-only)
billboardRotation C++ | Lua
billboard C++ | Lua
fakeBillboard C++ | Lua
cylindricalBillboard C++ | Lua
needUpdate C++ | Lua

Set needUpdate after writing position, rotation, scale, or billboardRotation. A hidden entity hides its children too, while each child keeps its own visible flag. visibleInHierarchy combines the flags of the entity and its ancestors and is refreshed by the render system on each update. Reparent with addChild.