Measuring velocity/impact

Mar 14, 2011 at 9:06 AM

Hi all,

In a game I'm working on, I'm interested to find out the force/impact/velocity when an object smashes into another. Obviously, this number is known by the Farseer engine, but how do I retrieve it?

I have this in my collision check sub:

            if (sprite1.Name.StartsWith("playerobject"))
            {
                if (sprite2.Name.StartsWith("hiddenpassage"))
 and then (pseudocode): if collisionforce > 123 then destroyobject(sprite2);

Thanks for any input!

/Pettrer