• Get the world position of an entity, taking into account the full parent hierarchy. This computes the world-space position by accumulating all parent transforms (position, rotation, and scale).

    When the entity has AvatarAttach and Transform, the renderer updates the Transform with avatar-relative values (including the exact anchor point offset for hand, head, etc.). This function combines the player's transform with those values to compute the world position.

    Returns

    The entity's position in world space. Returns {x: 0, y: 0, z: 0} if the entity has no Transform.

    Example:

    const worldPos = getWorldPosition(engine, childEntity)
    console.log(`World position: ${worldPos.x}, ${worldPos.y}, ${worldPos.z}`)

    Parameters

    Returns Vector3Type