dacha
    Preparing search index...

    Class Transform

    The position, rotation and scale of an actor. Every actor has one.

    local holds the values relative to the parent actor. world holds the values in the scene.

    const transform = actor.getComponent(Transform);
    transform.world.position.x += 10;

    Actors

    Hierarchy (View Summary)

    Index
    actor?: Actor

    The actor that has this component. It is undefined until the component is added to an actor.

    Local-space transform values (position, rotation, scale). These values are relative to the parent transform.

    localMatrix: Matrix

    Matrix representing the local-space transformation.

    World-space transform values derived from the local transform and the parent hierarchy.

    worldMatrix: Matrix

    Matrix representing the world-space transformation.

    • get invertedWorldMatrix(): Matrix
      Advanced

      Inverse of the world transformation matrix. Useful for converting world-space coordinates to local space.

      Returns Matrix

    • Returns the parent Transform component, if one exists.

      Returns Transform | undefined

      The parent Transform or undefined if this transform has no parent.

    • Advanced

      Marks this transform and all descendant transforms as dirty.

      This signals that their matrices must be recalculated before use.

      Returns void

    • Advanced

      Recomputes the local transformation matrix from local position, rotation, and scale.

      Returns void

    • Advanced

      Recomputes the world transformation matrix if the transform is dirty.

      This method ensures parent transforms are updated first and then composes the local matrix with the parent world matrix.

      Returns void