30 Point offset = {0.0f, 0.0f},
bool is_sensor =
false,
31 bool is_bullet =
false);
36 [[nodiscard]]
float width() const noexcept;
39 [[nodiscard]]
float height() const noexcept;
constexpr float default_box_collider_height
Definition box_collider_2d.h:7
constexpr float default_box_collider_width
Definition box_collider_2d.h:6
A 2D box collider component that defines a rectangular collision shape for a GameObject.
Definition box_collider_2d.h:25
~BoxCollider2D() override=default
BoxCollider2D(float friction, float bounciness, float width=default_box_collider_width, float height=default_box_collider_height, Point offset={0.0f, 0.0f}, bool is_sensor=false, bool is_bullet=false)
std::string type_name() const override
Provides a consistent type name for the component.
float height() const noexcept
void update(float dt) override
float width() const noexcept
Point offset() const noexcept override
A 2D collider base that defines the shape and physical properties of a GameObject for collision detec...
Definition collider_2d.h:31
float friction() const noexcept
float bounciness() const noexcept
Represents a point in 2D space.
Definition point.h:6