Spinning Rectangles
Hello reader, today I continued with the rotation and collision problem.
For a moment I was thinking that checking the edges separately, instead of only the min and max, was going to fix the problem.
However it’s not much different, other than being more work.
So at this moment I know for sure the actual checking of the edges is working correctly.
It’s more about the order of execution and how much to move I think.
I’m thinking about simply checking the current and future position. No shortcuts, performance will come later. If the future position (with the changed rotation) is overlapping with the tile we are checking against. Then we simply don’t move or rotate at all. That hopefully narrows it down and gives me something to work with.