- Home /
Trying to make my own take on Paddle + Ball games, but the physics can't seem to keep up.
Hello there,
As the title says my paddle game has an issue with the ball either destroying itself or passing right through the paddles. If the paddle is lerping between positions (player can move freely up and down but move to set position forward and back) it will pass right through. If the ball is going fast enough it will also pass through or disappear. The paddles don't have particularly thick 2D colliders but are about equal to the ball.
What adjustments do you recommend for better performance? Outside these cases the ball bounces off the paddles/walls just fine.
Answer by lovewessman · Sep 06, 2021 at 09:15 PM
I think what you want is to enable interpolation for the ball. You can do this by going into the Rigidbody component on the gameobject, change the "interpolate" option to "Interpolate" instead of "none". The thickness of the rigidbody will not matter if you are interpolating the position between each physics update.
Answer by lukasvogl · Sep 07, 2021 at 11:56 AM
Also note that all your code that actually moves a rigidbody should be on FixedUpdate() As those are the frames with physics. Often it will look like stuttering or bad framerate if you do it in regular Update().
Your answer
![](https://koobas.hobune.stream/wayback/20220613042610im_/https://answers.unity.com/themes/thub/images/avi.jpg)