0
$\begingroup$

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.

$\endgroup$

1 Answer 1

0
$\begingroup$

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

$\endgroup$
3
  • $\begingroup$ 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] (drive.google.com/drive/folders/…) is a link to the new file. $\endgroup$ Commented Apr 3, 2022 at 2:46
  • $\begingroup$ @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. $\endgroup$
    – Hulifier
    Commented Apr 3, 2022 at 3:23
  • $\begingroup$ @TrentConley I will add these infos to the answer. $\endgroup$
    – Hulifier
    Commented Apr 3, 2022 at 3:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .