diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-04 20:42:53 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-04 20:42:53 +0100 |
commit | 24246e115c3b7829d2981a2f60ac77da657f2ed5 (patch) | |
tree | 2040a2a4ce8cd9fe3ffadb8b92d54b14890bb1fa /src/crepe/api | |
parent | d76ab0bf77d0a61712dc25bbe1760995be4c4782 (diff) |
added collision layers
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/Rigidbody.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h index 756cc28..5c9f6df 100644 --- a/src/crepe/api/Rigidbody.h +++ b/src/crepe/api/Rigidbody.h @@ -130,6 +130,16 @@ public: * */ vec2 offset; + + /** + * \brief Defines the collision layers of a GameObject. + * + * The `collision_layers` vector specifies the layers that the GameObject will collide with. + * Each element in the vector represents a layer ID, and the GameObject will only detect + * collisions with other GameObjects that belong to these layers. + */ + std::vector<int> collision_layers; + }; public: |