Skip to content

Class PhysicsLayers

Namespace: Apogee.Physics
Assembly: Apogee.Physics.dll

Which bodies collide with which. A body has , the collision layers it belongs to (a bit each), and , the layers it collides with; two bodies collide when each is in a layer the other's mask holds. There are 14 layers for the game (bits 0 to 13). The native layer keeps two more bits of its own to sort bodies into the broad phase (static, sensor, moving); static bodies never collide with each other. See Native/jolt/apogee_jolt.h.

public static class PhysicsLayers

Inheritance

object ← PhysicsLayers

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Fields

All

Every layer of the game: the default mask.

public const uint All = 16383

Field Value

uint

Count

How many layers a game can use.

public const int Count = 14

Field Value

int

Default

The layer a body is in unless it says otherwise.

public const uint Default = 1

Field Value

uint