Unexpected Box Edge Collision
Posted: Sat Jul 28, 2012 11:49 pm
So here's the deal.
I'm making a small platformer, using tile maps to define the levels, and creating the solid tiles as static physical objects that collide with the player, and everything is fine about that.
Usually, collision works just great. Except when the player reaches the edge between a tile and another. Sometimes he passes through them, sometimes he gets stuck on it, and I can't figure out why.
To try and ease this, I made a small algorithm to scan for adjacent tiles horizontally and create them as a single continuous object, but as far as vertical strips of tiles (Walls) go, they still have the same bug, so I'm here humbly asking for help.
The bug occurs sometimes when you try to jump while pressing onto a vertical wall, you ocasionally get stuck, as if you were touching the ground.
I dunno what is wrong or why this happens, but it's always on the edge between two tiles.
Here's the .love for the game if its any help, and thanks.
PS: Feel free to comment on any other aspect of the game if you want.
I'm making a small platformer, using tile maps to define the levels, and creating the solid tiles as static physical objects that collide with the player, and everything is fine about that.
Usually, collision works just great. Except when the player reaches the edge between a tile and another. Sometimes he passes through them, sometimes he gets stuck on it, and I can't figure out why.
To try and ease this, I made a small algorithm to scan for adjacent tiles horizontally and create them as a single continuous object, but as far as vertical strips of tiles (Walls) go, they still have the same bug, so I'm here humbly asking for help.
The bug occurs sometimes when you try to jump while pressing onto a vertical wall, you ocasionally get stuck, as if you were touching the ground.
I dunno what is wrong or why this happens, but it's always on the edge between two tiles.
Here's the .love for the game if its any help, and thanks.
PS: Feel free to comment on any other aspect of the game if you want.