May the force be with you.

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Rademanc
Posts: 16
Joined: Sat Apr 25, 2009 4:21 pm

May the force be with you.

Post 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?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: May the force be with you.

Post 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.'
Rademanc
Posts: 16
Joined: Sat Apr 25, 2009 4:21 pm

Re: May the force be with you.

Post by Rademanc »

Thanks for all the help so far Norbo. You are really making my game possible.
Post Reply