Some problem with Impulse

Mar 19, 2009 at 3:45 PM
Edited Mar 19, 2009 at 4:00 PM
Hi everyone, I'm tring to move my first steps with JigLibX but I have some problem with Impulse methods especially with ApplyBodyImpulse(). If I understand well if I have a constant impulse and pos vectors, this method apply the same impulse at the same position (referenced in body coordinate system) every time no matter where the body is and how it's oriented. But in my experiments it doesn't seems to work like that.

In particular I found in Body.cs at line 1018 these two rows:
            Vector3.Add(ref transform.Position, ref pos, out pos);
            Vector3.Subtract(ref pos, ref transform.Position, out pos);

It seems to me that transform.Position is added to pos and then subtracted and so the result is immutated. Is this a bug?

Please help.
Mar 20, 2009 at 4:42 PM
you are right - this is nonsense...
 it's not used in JigLibX internally and not in the demo.

I will fix it - thank you