Normal Direction
I think I finally manage to figure out what is going wrong with the collision detection. The MVP(Most Valuable Player) this time was the Looped Live Code Editing. Well, I wasn’t editing the code (yet). But being able to loop the came where the bug happened really helped. This way I could easily know which frame the bug would occur.

I did use it before if I remember it correctly. However this time I clearly noticed that the normal was incorrect. Everything seemed as intended, until the actual collision happened. The entity should have been stopped, which happened, always. But their velocity should also be nullified, which didn’t happen. Why did it not happen? Well the normal was pointing to the bottom left. The movement was in the forward direction, so the top center. You see the problem there?

The normal is not pointing in the correct direction at all. I would have expected the normal to point to the bottom right or to the top left. Then the velocity would have been nullified in the correct direction. Then everything would have been fine. Now it basically nullified in the direction the entity was still allowed to move in. And the velocity keeps increasing in the direction of the actual collision. So I need to fix this issue, of course. And then I expect everything to work fine again. Though this won’t fix the continuous rotation problems I had. But this is the first step to getting that working.

Last modified: January 24, 2023