BoxCollider2D
The BoxCollider2D
class is part of the zygarde::physics::components
namespace and is designed to represent a 2D box-shaped collider within the physics engine. It provides methods to manage collision detection and response for rectangular objects.
Overview​
BoxCollider2D
is a final class that allows the definition and manipulation of a 2D box collider. It holds data about the size of the collider and supports specifying collision and inclusion layers to manage how collisions are detected with other objects.
Properties​
size
: AVector2f
representing the width and height of the box collider.collision_layers
: A vector of integers specifying the collision layers the box collider is considered part of.include_layers
: A vector of integers specifying the inclusion layers for the collider, these are the layers the collider will check against.