aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/Rigidbody.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h
index df97763..9dbb42b 100644
--- a/src/crepe/api/Rigidbody.h
+++ b/src/crepe/api/Rigidbody.h
@@ -123,26 +123,37 @@ public:
*/
float elastisity_coefficient = 0.0;
- //! Enable static collision handeling for object colliding with kinematic object in collision system
- bool kinematic_collision = true;
-
/**
- * \brief Defines the collision layers of a GameObject.
+ * \brief Enables collision handling for objects colliding with kinematic objects.
*
- * 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 that `collision_layer`.
+ * Enables collision handling for objects colliding with kinematic objects in the collision system.
+ * If `kinematic_collision` is true, dynamic objects cannot pass through this kinematic object.
+ * This ensures that kinematic objects delegate collision handling to the collision system.
*/
+ bool kinematic_collision = true;
+
+ /**
+ * \brief Defines the collision layers a GameObject interacts with.
+ *
+ * The `collision_layers` represent the set of layers the GameObject can detect collisions with.
+ * Each element in this set corresponds to a layer ID. The GameObject will only collide with other
+ * GameObjects that belong to one these layers.
+ */
std::set<int> collision_layers = {0};
- //! the collision layer of the object.
+ /**
+ * \brief Specifies the collision layer of the GameObject.
+ *
+ * The `collision_layer` indicates the single layer that this GameObject belongs to.
+ * This determines which layers other objects must match to detect collisions with this 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.
+ * Each element represents a name from the Metadata of the gameobject.
*/
std::set<std::string> collision_names;
@@ -150,7 +161,7 @@ public:
* \brief Defines the collision layers of a GameObject.
*
* The `collision_tags` specifies where the GameObject will collide with.
- * Each element represents a tag.
+ * Each element represents a tag from the Metadata of the gameobject.
*/
std::set<std::string> collision_tags;