5
votes

I am running into a problem where when a physics enabled ball is going slowly it doesn't bounce off objects correctly. I have made a video to illustrate the problem

https://youtu.be/9T1hkir7sCo

Basically, the ball should run into the stationary ball and the stationary one should bounce off. This works when the speed is fast enough, but below a threshold they both just start moving together, which looks weird.

Whats going with this, and how can I make it react properly?

Experiment details (same for both objects):

RigidBody

  • Mass: 1
  • Drag: 0
  • Angular Drag: 0
  • Use gravity: false

Physics material:

  • Dynamic friction: 0
  • Static friction: 0
  • Bounciness: 1
1

1 Answers

9
votes

Unity's default Bounce Threshold for recognizing bounces is a velocity > 2

Set a velocity value. If two colliding objects have a relative velocity below this value, they do not bounce off each other. This value also reduces jitter, so it is not recommended to set it to a very low value.


You can change this Bounce Threshold in the PhysicsManager (Edit->Project Settings->Physics):

enter image description here

or via script on runtime (see Physics.bounceThreshold)

Physics.bounceThreshold = 1;

Make it as small as you need it ... but note

This value also reduces jitter, so it is not recommended to set it to a very low value.

enter image description here