diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-03 18:04:05 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-03 18:04:05 +0100 |
commit | 3622b63a0d2ce3f1168d2b43d91987076c7c94cd (patch) | |
tree | a8f2c734e25e833ffc53cf88404f6d639b5cc1ab /src/crepe/system/CollisionSystem.h | |
parent | 4bbc27098d5a8907ab0500ad3ccc82283cf95ddf (diff) |
moved active check to update and changed gather of components
Diffstat (limited to 'src/crepe/system/CollisionSystem.h')
-rw-r--r-- | src/crepe/system/CollisionSystem.h | 6 |
1 files changed, 3 insertions, 3 deletions
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<std::pair<CollisionInternal,CollisionInternal>> gather_collisions(std::vector<collider_variant> & colliders); + std::vector<std::pair<CollisionInternal,CollisionInternal>> gather_collisions(std::vector<CollisionInternal> & colliders); /** * \brief Checks for collision between two colliders. |