5

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
0

1 Answer 1

11

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

1
  • Very well documented answer. Thank you for your effort. This is exactly what i needed
    – Mr Bell
    Feb 13, 2019 at 14:58

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.