Skip to main content
The Basis class represents a local coordinate system defined by a Face (which side of a cube is “up”) and an Orientation (compass direction). It provides direction vectors (front, back, right, left, up, down) and methods to compute rotated variants. You obtain a Basis from entity properties like block.basis, enemy.basis, ball.basis, or construct one directly.
Related types: Face, Orientation, Vector3

Constructors

Properties

Direction Vectors

Turned Bases

Methods

withFace

Returns a copy of this basis with a new face.

withOrientation

Returns a copy of this basis with a new orientation.

Usage Example

Get the direction vectors from a block’s basis to determine movement:
Construct a basis from a specific face and orientation: