0

I'm trying to create a rigid body simulation that is physically accurate (meaning that energy and momentum are conserved in the system). I want to drop a sphere off of a larger sphere, and I've included the link to my file here. The small sphere hits the large sphere as it falls, changes its direction, then falls and hits the ground but it seems that nearly all the energy the ball gained disappeared as soon as the ball hit the ground plane. I just want the ball to bounce back up and sideways while conserving the energy in the system.

I've also looked at some other posts like this. I looked at the resources that others suggested, but could not find a solution to my problem.

Is there an inherent bug in the code that can't be fixed? Any and all help is much appreciated. Thanks.

1 Answers1

0

For making your falling ball bounce it's rigidbody also needs to have a bounciness value greater than zero:

rigidbody bounciness

Your ground plane already have it set to more than zero.

Result:

bouncing ball

Note that with the value 1 it practically retains all energy, you may want a smaller value, so it doesn't bounce forever.

Bounciness: 0.9:

bounce slowing

You can also add a small value of Damping in the ball to lose velocity over time, but it's not necessary.

damping

Hulifier
  • 6,048
  • 1
  • 8
  • 24
  • Great! Thanks so much. Problem solved, but the energy is still a little wonky. The ball ends up hitting the ceiling even though it started below it. Any suggestions to work around that? [Here] (https://drive.google.com/drive/folders/1eS9-Pl4oZjWtK0V1_QOzYSiy1-FO9osQ?usp=sharing) is a link to the new file. – Trent Conley Apr 03 '22 at 02:46
  • @TrentConley try Bounciness values smaller than 1, like 0.9, also i recommend adding a very small amount of damping for the ball in the dynamics tab, like 0.01. – Hulifier Apr 03 '22 at 03:23
  • @TrentConley I will add these infos to the answer. – Hulifier Apr 03 '22 at 03:33