diff --git a/include/Collision/collisionDetector.h b/include/Collision/collisionDetector.h index 2c3699d3..563de30b 100644 --- a/include/Collision/collisionDetector.h +++ b/include/Collision/collisionDetector.h @@ -82,7 +82,8 @@ namespace Hop::System::Physics bool world; }; - virtual std::pair::iterator, std::multimap::iterator> objectHasCollided(Id & id) { return collided.equal_range(id); } + virtual std::pair::iterator, std::multimap::iterator> objectCollisions(Id & id) { return collided.equal_range(id); } + virtual bool objectHasCollided(Id & id) { collided.find(id) != collided.end(); } protected: diff --git a/include/System/Physics/sCollision.h b/include/System/Physics/sCollision.h index 092310f1..9b8560bc 100644 --- a/include/System/Physics/sCollision.h +++ b/include/System/Physics/sCollision.h @@ -51,7 +51,8 @@ namespace Hop::System::Physics resolver = std::move(r); } - std::pair::iterator, std::multimap::iterator> objectHasCollided(Id & id) { return detector->objectHasCollided(id); } + std::pair::iterator, std::multimap::iterator> objectCollisions(Id & id) { return detector->objectCollisions(id); } + bool objectHasCollided(Id & id) { detector->objectHasCollided(id); } void centreOn(std::pair p){centreOn(p.first,p.second);}