Normals
Just when you thought you solved one of the problems, stuff starts to break again.
Luckily for me I was able to create an overview of what was going wrong.
As I found some code that I didn’t want, but that sort of made the collision work.
In the end I was able to comment it out and make the rest work like it should.
However when I now hit a straight wall and then move towards a diagonal tile, the entity gets stuck.
I don’t know how I missed this earlier.
But I do know that the new code for determining the normals is the culprit.
I thought it would be a simple fix. Instead of setting tFirst to 0, set it to the actual value that was calculated. Which is a negative value, but we can just at the end tell the code to clamp to 0. That was already happening so not much needed to change. However that presumably easy fix isn’t working out.
I’ll have to take a closer look why this weird behaviour happens at those specific places. Again, live looped code editing really helps here. Not per se the code editing part, but the looping of a specific scenario is amazing for these situations. Saves me a lot of time!