Sometimes the ball falls through the paddle

Hi,
I have created a nice BlockBreaker under Ben’s guidance, It works very good except for sometimes when i move the mouse too fast the ball falls through the paddle…

I think it’s because the mouse speed faster then frame rate, So Update() function does not handle the collision, Maybe… this is only an assumption

Does anyone know how to fix this? Any clue that will get my on the right direction will be much appreciated :worried::

1 Like

Hi Mike,

You have written a good description and belief of what the issue is, well done.

Select the Ball and then in the Inspector, change the Collision Detect property of the Rigidbody2D component to Continuous.

See if that improves your issue.

Hope this helps :slight_smile:

Hi Rob,
I just tried to set Collision Detect property to ‘Continues’ like you wrote, It behaves same as before,
When I set the paddle to go only at vector X (sideways) The game is fully playable and the ball never falls through the paddle.
When I add the vector Y to the paddle so the paddle follows mouse position up and down and sideways, The ball still falls through the paddle especially when mouse moves fast.

Thank you for helping

Could you zip up your project files so that I could have a look?

Block Braker.zip (6.8 MB)

Thanks, I’ve uploaded the project…

(BTW) I tried using FixedUpdate instead of Update without luck

Privacy & Terms