Re: [jit.phys] Newton's Cradle example

Forums > Jitter > [jit.phys] Newton's Cradle example
May 1, 2013 | 9:04 am

Hi Rob,

thanks again for your suggestion. I implemented the "locking the middle hinges" and right now, it gives funny results. But I guess it can be tuned. (I have not implemented the hack with passing the impulse to the opposite ball) yet.

Alternatively, I made an option that for every collision
* the hitting sphere is A
* the hit sphere is B
- passes on the velocity of A to B
- places A at its resting position
- sets A’s velocity to zero.

This looks a bit jumpy but it is rather realistic. Is there a way to naturally move the sphere to its resting position rather than just ‘teleporting’ it there?

Both options are in the updated patch, in case someone’s curious….

Cheers and thanks!

  1. theworld.js