Open Jasbir23 opened 3 months ago
I am facing similar issues with non static bodies as well when trying to create perfectly elastic collisions.
Body 1 mass = 1 position = (-10,0,0) Velocity = 10 units (along x axis)
Body 2 mass = 1 position = (0,0,0) Velocity = 0
After collision - Body 1 velocity = -0.77 Body 2 velocity = 10.77
Where is this extra 0.77 coming from ? Restitution is 1
I am trying to implement ideal world physics. When an object collides with a static body, the momentum should be conserved, however the velocity after collision is more than the initial velocity of the object. here is a code snippet -
Here initial velocity of the body is -10 and after collision the velocity becomes 11.53. Ideally, the velocity should have become 10 after collision since restitution is 1.