0 votes

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).

in Engine by (78 points)

1 Answer

0 votes
Best answer

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.

by (298 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.