Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.16 KB

File metadata and controls

42 lines (31 loc) · 1.16 KB

Component attached to a "model" Entity that describes the colliders associated with the 3D model.

Specs

Members

Collider type

struct Collider {
    enum Shape {
        Box,
        Capsule,
        Cone,
        Cylinder,
        Sphere
    };

    Shape shape;
    putils::string<KENGINE_BONE_NAME_MAX_LENGTH> boneName;
    putils::Rect3f boundingBox = { {}, { 1.f, 1.f, 1.f } };
    float yaw = 0.f;
    float pitch = 0.f;
    float roll = 0.f;
};

The maximum length of a bone name (stored as a putils::string) defaults to 64, and can be adjusted by defining the KENGINE_BONE_NAME_MAX_LENGTH macro.

colliders

putils::vector<Collider, KENGINE_MAX_MODEL_COLLIDERS, vectorName> colliders;

The maximum number of colliders defaults to 64 and can be adjusted by defining the KENGINE_MAX_MODEL_COLLIDERS macro.