Page 1 of 1

May the force be with you.

Posted: Wed Sep 09, 2009 10:21 am
by Rademanc
I need to know how hard two bodies collided. How hard the impact is.
I have a EventHandlerInitialCollisionDetected method for when the entities collide, but I have no idea how to calculate the force of the impact.
Can you help?

Re: May the force be with you.

Posted: Wed Sep 09, 2009 5:15 pm
by Norbo
The CollisionPair associated with the event has a list of contacts in it. Each contact has a normalImpulseTotal field amongst others. The normal impulse represents the magnitude of the impulse required to keep the objects from interpenetrating, and is a good measure of 'impact force.'

Re: May the force be with you.

Posted: Wed Sep 09, 2009 9:54 pm
by Rademanc
Thanks for all the help so far Norbo. You are really making my game possible.