Rengine / docsProject documentation

Reference

Transform Composition

Look up syntax, contracts, layouts, algorithms, and exact behavior.

Rengine's central mathematical object is the local-to-world transform. Entity position, anchor, rotation, and scale are stored locally. Folder entities compose those local values into world values for their children, which allows nested motion without copying absolute coordinates into every descendant.

Me=T(pe) R(re) S(se) T(−ae)M_e = T(p_e)\,R(r_e)\,S(s_e)\,T(-a_e)
Local transform matrix. An entity transform translates to position, rotates, scales, and offsets by anchor.
We=Wparent MeW_e = W_{parent}\,M_e
World transform. A child world transform is the parent world transform multiplied by the child's local transform.
Root folder W0
  |
  +-- Orbit folder M1 -> W1 = W0 M1
        |
        +-- Box M2 -> W2 = W1 M2
        |
        +-- Child folder M3 -> W3 = W1 M3
Folder composition. Folders are ordinary transform nodes that contribute a parent transform to every child.

The runtime inspector exposes both local and world-space values because most transform bugs are mismatches between the two. A child that appears wrong on screen may have a correct local transform but an unexpected parent transform, or the inverse.