diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-18 21:13:55 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-18 21:13:55 +0100 |
commit | 3855044ad97a41ca71b0d3ea2240f4eee93cc86f (patch) | |
tree | 204cc74691888b119d2b9c0c1a45fd8402758d0e /src/crepe/api | |
parent | 6e92c59b3364b00eb15c310120b93acc83ca504e (diff) |
updating collision system
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/Rigidbody.h | 26 |
1 files changed, 24 insertions, 2 deletions
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 <cmath> #include <set> +#include <string> #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<int> 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<std::string> 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<std::string> collision_tags; + + }; public: |