restitution

How to implement restitution coefficient into a simple physics engine?

I am writing a simple 2d physics engine that supports circle-circle collision and i can't figure out how to retrofit my collision resolution method to add restitution. How is a restitution coefficient property implemented in physics engines? ...

Applying Coefficient of Restitution in a collision resolution method

I have a collision resolution method in my physics engine, that goes like this: Vector2 n1pos = n1.NonLinearSpace != null ? n1.NonLinearPosition : n1.Position; Vector2 n2pos = n2.NonLinearSpace != null ? n2.NonLinearPosition : n2.Position; Vector2 posDiff = n2pos - n1pos; Vector2 posDiffNormal = posDiff; posDiffNormal.Normalize(); float...