Inverted Pyramid collider

Subscribers:
1,260
Published on ● Video Link: https://www.youtube.com/watch?v=aFFM5QpAN9U



Duration: 0:35
15 views
0


I'm having fun experimenting with this. I added a major performance optimization that detects if a ball is close to the ground plane and has a very tiny Y velocity, I just set the Y velocity to 0 and set the position's y component to the ball's radius. Then disable gravity for it. To prevent any potential errors. If the ball is involved with a collision of any kind, gravity is re-enabled for the rest of the frame. the gravity disabling algorithm only checks once at the start of each frame.

That whole explanation isn't being applied here, you can see the max iterations is hovering around 400, because there is not flat ground. When the balls are at rest on actual flat ground, the iterations will drop to 1 with this performance fix. This fix won't help stacking performance due to it them being in a constant collision state.