struct
#include <engine/collisions/collider.hpp>
Collider Component which adds a collider to an entity.
Public variables
- glm::mat4 transform
- Transform of the collider.
-
core::
geom:: AABB localAABB - Local space AABB of the collider.
-
core::
geom:: AABB worldAABB - World space AABB of the collider.
- uint64_t layer
- Layer of the collider, from 0 to 63.
- uint64_t mask
- Mask of layers which the collider can collide with.
- float margin
- Margin of the collider.
Variable documentation
uint64_t cubos:: engine:: Collider:: mask
Mask of layers which the collider can collide with.
Set to (1 << 0) to collide only with entities of layer 0, to (1 << 0) | (1 << 1) to collide with entities of layer 0 and 1, etc.
By default, colliders collide with layer 0.
float cubos:: engine:: Collider:: margin
Margin of the collider.
When the collider shape has sharp edges, a margin is needed. The plugin will set it based on the shape associated with the collider.