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?
I don't know much about implementing game physics but I would use the following formulas found on the wikipedia page:
These formulas tell you the velocy of an object after a collision given your constant Cr. This will be easy to place in your application if:
If you have done that then you can use those formulas to decay velocity upon collisions. Your collision calculations are separate to that; this deals with the momentum of your objects.