From 24246e115c3b7829d2981a2f60ac77da657f2ed5 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 4 Dec 2024 20:42:53 +0100 Subject: added collision layers --- src/crepe/api/Rigidbody.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/crepe/api/Rigidbody.h') 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 collision_layers; + }; public: -- cgit v1.2.3