So I’ve been working for hours on my collision detection and I’ve encountered a problem where, because of floating point inaccuracies, the y position of the player is 4.0000000005 (I use a unit scale), which stops it walking below platforms. Also, the player seems to walk over gaps as the x position is never an int. I’ve not been able to think of a solution.
The pink rectangle is where it should be if it could move.
As it’s a unit scale, casting to int wouldn’t work, which leaves me stuck for thought. Any ideas?