Tilemap collision problem.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wbgyor

I have a tilemap with square tiles and collision polygon of same size made in it. A ball ( rigidbody2d with circular collision shape ) can collide with it. Whenever the ball collides at the point of joining of two tiles , the ball bounces back in a different direction than the expected . Is the problem caused due to the uneven edges of tiles or something like that?. How can it be managed to get accurate ball paths ? ( like same angle of incidence and angle of reflection).

:bust_in_silhouette: Reply From: Amateur.game.dev.

Why don’t you just use a collision shape for the tiles, seeing they’re only square, and instead of having multiple collisionshapes have one for each row of tiles that you have, like i do for my game.
here is what I mean

As you can see, if you right click on the link and click “open image”, that I have connected 6 platforms to a static body > collisionshape for easier movement, duplication and editing.