I am wondering if there is a general best practice for collision because I’m having some trouble with consistency.
I’m working on a game and I’ve created collision boxes for walls that the character can’t walk through. They trigger collision flags depending on the direction that stop the character’s motion. The problem is that if the character’s speed is more than 1 pixel per frame, sometimes they completely skip over the edge detection entirely, clip inside and render the collision box useless. I’ve tried adding a bit of a buffer to the edge detection, but it’s becoming unrealistic and over complicated.
Does anyone have any suggestions?