From ca8b16620ec207f2b32edd1f5d46f7b0bfb0a14c Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 21 Nov 2023 02:28:00 +0100 Subject: Clumsy non-swept AABB collision system for Player --- src/Entities/Player.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Entities/Player.hpp') diff --git a/src/Entities/Player.hpp b/src/Entities/Player.hpp index 0422509..7238e80 100644 --- a/src/Entities/Player.hpp +++ b/src/Entities/Player.hpp @@ -33,6 +33,10 @@ private: // Creates a bounding box where `position` is at the center of the bottom face. static AABB bounding_box_for_position(Position::World position); + // Returns position of the center of the bottom face of `box`. + static Position::World position_for_bounding_box(AABB box); + + static Position::World collision_reposition(Position::World from, Position::World to, AABB colliding); Transform m_transform; -- cgit 1.4.1