The Right If
I’ve again been working on the tile collision. Yes it’s still not fixed. The hard part is that I use the Separating Axis Theorem in the opposite way than it works. It would tell you if there is overlap better known as a collision. However my code is currently structured that it would like to know how far it can still travel to prevent that overlap. When there is overlap it’s already too late…
What definitely doesn’t help in this case is that I only work on it on the train rides. So I can only fully focus for a short period of time and even then I can’t commit fully to it. That means I probably have to work on it in the weekend. Preferably on a Sunday to fully focus on the matter at hand and finally fix it.
It’s an important piece of the puzzle and maybe I don’t have to revisit it that much after this as well. Since it should be able to handle rotation which the old algorithm doesn’t. But finding the right condition to check to make sure you can just move when there is nothing in the entity’s way is harder than it seems. Partly due to the inverse thinking I have to do and partly due to not being able to fully focus when it is really needed.