I was testing out Platformer - Basic PHYSICS, and when I was moving around the character would occasionally get stuck as if they hit a wall, but nothings there. I just started to work on my own game and hoped it would fix itself. It didn’t. Does anybody know why this happens and how I can prevent it? The places I get stuck at are not the same places every time.
I took a little video if you don’t know what I’m talking about.
Yes so the physics on your main character I’m guessing are just 4 points “square”. The physics need to change to 8 points where the edges have a very small 1-3 pixels diagonal shape this way it won’t get stuck on any walls. This is normal box2D feature and this methods fixes it. The final shape would still be a “square” but each vertex (your 4 points) will now have like 2 vertex’s very close to each other.
Yes so the physics on your main character I’m guessing are just 4 points “square”. The physics need to change to 8 points where the edges have a very small 1-3 pixels diagonal shape this way it won’t get stuck on any walls. This is normal box2D feature and this methods fixes it. The final shape would still be a “square” but each vertex (your 4 points) will now have like 2 vertex’s very close to each other.