I'm trying to simulate a game like billiards / shuffleboard / curling where two objects collide and under a perfect direct hit all energy is transferred to the second object. Both matter.js and p2.js create a world where the expected gravity is in Y axis. Setting gravity to 0 and air friction to something high I can get a pretty good simulation of birds-eye view. However when two identical objects collide at low speed they both continue moving forward.

I kept playing with mass, restitution, slop, etc. Cannot simulate a situation where one object stops and the other starts moving (low speed). Any advice would be greatly appreciated!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.