Skip to content

Engine → Physics

physics_layers.h

Physics layers: up to 32 named layers with a symmetric collision matrix, authored in project.json under extensions.physics_layers. Layer indices are positions in the "names" array; a physics_layer_mask is a u32 bit set over those indices (bit i = layer i).

Structs

File Description
physics_layer_mask A set of layers as one bit per layer index. The default mask includes every layer.

Classes

File Description
physics_layer_table The named layers and their symmetric collision matrix. A value type; immutable once a physics_world was constructed from it (the world keeps its own copy).

Constants

Name Type Value Description
MAX_PHYSICS_LAYERS inline constexpr u32 32 Most layers a table may hold; the mask is a u32.