EngineIntermediate
Coordinates and transforms
Understand Airogel’s axes, quaternions, hierarchy, and local versus world transforms.
World axes
- +X: right
- +Y: up
- +Z: forward
Character objects display a yellow arrow pointing along +Z. To place a camera behind a character, use a negative local Z offset.
Position and rotation
getPosition() and setPosition(x, y, z) use world coordinates. Rotations are quaternions:
local angle = math.pi / 2
gameObject.setRotation(0, math.sin(angle / 2), 0, math.cos(angle / 2))
Hierarchy
Use getParent(), getChildren(), and setParent(parentId) to inspect or change hierarchy. The API exposes both world and local transforms:
getWorldPosition(),getWorldRotation(),getWorldScale()getLocalPosition(),getLocalRotation(),getLocalScale()getForward()andgetRight()for world-space facing vectors
Camera-relative movement
Get the active camera with scene.getActiveCamera(), flatten its forward and right vectors onto the XZ plane, normalize them, and combine them from input. This keeps movement aligned with the rendered camera rather than fixed world axes.