Vectors
A vector is a set of numbers that describes a position or direction in space.| Type | Description |
|---|---|
Vector2 | 2D position or direction — x and y |
Vector3 | 3D position or direction — x, y, and z |
Vector4 | 3D with a bonus W value — used for shaders, margins, and borders |
Vector2Int | Integer version of Vector2 |
Vector3Int | Integer version of Vector3 |
Rotation and Angles
Rotation
ARotation represents an orientation in 3D space. It is implemented as a quaternion, which avoids gimbal lock and composes reliably. Use Rotation in code wherever you store or manipulate orientations.
Angles
Angles stores orientation as pitch, yaw, and roll — easier to read and write by hand, but prone to gimbal lock. Use it for authoring values in the editor or for player input, then convert to Rotation for calculations.
Transform
ATransform holds a Position (Vector3), a Rotation (Rotation), and a Scale (Vector3). Together these fully describe where something is, which way it faces, and how large it is.
Every GameObject exposes two transforms:
GameObject.WorldTransform— position in world spaceGameObject.LocalTransform— position relative to the parent