aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/CollisionSystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system/CollisionSystem.h')
-rw-r--r--src/crepe/system/CollisionSystem.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/crepe/system/CollisionSystem.h b/src/crepe/system/CollisionSystem.h
index 5b136c6..b802426 100644
--- a/src/crepe/system/CollisionSystem.h
+++ b/src/crepe/system/CollisionSystem.h
@@ -100,19 +100,6 @@ private:
CollisionInternalType get_collider_type(const collider_variant & collider1,
const collider_variant & collider2) const;
- /**
- * \brief Calculates the current position of a collider.
- *
- * Combines the Collider offset, Transform position, and Rigidbody offset to compute the position of the collider.
- *
- * \param collider_offset The offset of the collider.
- * \param transform The Transform of the associated game object.
- * \param rigidbody The Rigidbody of the associated game object.
- * \return The calculated position of the collider.
- */
- vec2 get_current_position(const vec2 & collider_offset, const Transform & transform,
- const Rigidbody & rigidbody) const;
-
private:
/**
* \brief Handles collision resolution between two colliders.
@@ -195,6 +182,15 @@ private:
void determine_collision_handler(CollisionInfo & info);
/**
+ * \brief Calls both collision script
+ *
+ * Calls both collision script to let user add additonal handeling or handle full collision.
+ *
+ * \param info Collision information containing data about both colliders.
+ */
+ void call_collision_events(CollisionInfo & info,CollisionInfo & info_inverted);
+
+ /**
* \brief Handles collisions involving static objects.
*
* Resolves collisions by adjusting positions and modifying velocities if bounce is enabled.
@@ -203,6 +199,15 @@ private:
*/
void static_collision_handler(CollisionInfo & info);
+ /**
+ * \brief Handles collisions involving dynamic objects.
+ *
+ * Resolves collisions by adjusting positions and modifying velocities if bounce is enabled.
+ *
+ * \param info Collision information containing data about both colliders.
+ */
+ void dynamic_collision_handler(CollisionInfo & info);
+
private:
/**
* \brief Checks for collisions between colliders.