Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Basic usage for a 1x2x1 box

Box-shaped collider.

Box-shaped colliderExplicit box collider that users can add to customize collision shape. If present on an entity with RigidBody, overrides the automatic mesh-based collision.

Note
The offset member is applied to the created physics shape when building the collision shape.
collider.halfExtents = glm::vec3(0.5f, 1.0f, 0.5f);
entity.AddComponent<Physics::BoxCollider>(core, collider);
Definition BoxCollider.hpp:44
glm::vec3 halfExtents
Half-extents of the box (size / 2).
Definition BoxCollider.hpp:46

usage for a 1x2x1 box