From 3855044ad97a41ca71b0d3ea2240f4eee93cc86f Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 18 Dec 2024 21:13:55 +0100 Subject: updating collision system --- src/crepe/api/Rigidbody.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/crepe/api/Rigidbody.h') diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h index 0f6be21..df97763 100644 --- a/src/crepe/api/Rigidbody.h +++ b/src/crepe/api/Rigidbody.h @@ -2,6 +2,7 @@ #include #include +#include #include "../Component.h" @@ -122,7 +123,7 @@ public: */ float elastisity_coefficient = 0.0; - //! Enable collision handeling in collision system + //! Enable static collision handeling for object colliding with kinematic object in collision system bool kinematic_collision = true; /** @@ -130,9 +131,30 @@ public: * * The `collision_layers` specifies the layers that the GameObject will collide with. * Each element represents a layer ID, and the GameObject will only detect - * collisions with other GameObjects that belong to these layers. + * collisions with other GameObjects that belong to that `collision_layer`. */ std::set collision_layers = {0}; + + //! the collision layer of the object. + int collision_layer = 0; + + /** + * \brief Defines the collision layers of a GameObject. + * + * The `collision_names` specifies where the GameObject will collide with. + * Each element represents a name. + */ + std::set collision_names; + + /** + * \brief Defines the collision layers of a GameObject. + * + * The `collision_tags` specifies where the GameObject will collide with. + * Each element represents a tag. + */ + std::set collision_tags; + + }; public: -- cgit v1.2.3