From 3622b63a0d2ce3f1168d2b43d91987076c7c94cd Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Tue, 3 Dec 2024 18:04:05 +0100 Subject: moved active check to update and changed gather of components --- src/crepe/system/CollisionSystem.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/crepe/system/CollisionSystem.h') diff --git a/src/crepe/system/CollisionSystem.h b/src/crepe/system/CollisionSystem.h index 34c03ae..9e9096c 100644 --- a/src/crepe/system/CollisionSystem.h +++ b/src/crepe/system/CollisionSystem.h @@ -40,8 +40,8 @@ private: * This structure stores the collider type, its associated transform, and its rigidbody. */ struct CollisionInternal { - //! Store either BoxCollider or CircleCollider - collider_variant& collider; + game_object_id_t id = 0; + collider_variant collider; Transform& transform; Rigidbody& rigidbody; }; @@ -196,7 +196,7 @@ private: * \param colliders A collection of all active colliders. * \return A list of collision pairs with their associated data. */ - std::vector> gather_collisions(std::vector & colliders); + std::vector> gather_collisions(std::vector & colliders); /** * \brief Checks for collision between two colliders. -- cgit v1.2.3