Hi all,
I’m beginning development of a platformer. I’m loading a tilemap and using it for collision. I have an issue where as my character walks along the ground they will sometimes collide with the left or right edges of each ground tile, causing them to lose their velocity. The same problem occurs when falling against a wall - the player can collide with the bottom and top of individual wall tiles making them bump their head or be able to land on sections of the wall.
To demonstrate the issue I branched a simple platformer test and added in some acceleration and found the same issues. If you run this project and walk along the ground you’ll find sometimes your velocity will be cancelled even though it doesn’t look like you’ve hit anything and if you jump while pressing into a wall you’ll bump your head then land in the wall.
The player script is here:
Any suggestions on how to tackle this? I was trying to filter out collisions or velocity resets based on the collision info but couldn’t think of logic that would do that without breaking the collision in other ways. If there was a way to combine adjacent tiles’ physics colliders if they’re the same so each ground or wall was one physics object that would be best, is there a way to do that?