Bug when ball collides between two unbreakable blocks

Hello!
I’ve been having this bug when my ball collides between two unbreakable blocks it goes flying in a weird direction. I’ve been trying to fix is but the only thing that worked was removing the colliders from each block and create a big one that gets them all.
Would love some help, thank you!

Hi Maoaii,

Have you already tried to set the Collision Detection of the ball’s Rigidbody2D component to “Continuous”?

I haven’t until now!
Just tried it and it seems it isn’t happening anymore!
May I ask how does changing it to Continuos fix the problem?
Thanks a lot :smiley:

Unity’s physics simulation is highly optimised meaning it does not check for collisions that often. I think, with “continuous”, it checks for collisions more often. This has an negative impact on the performance, which is why you should not set the collision detection mode to “continuous” on every game object. For the ball it is fine because it is the only game object that’s flying around fast.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms