5
\$\begingroup\$

I'm new to Farseer and have a simple question. The demos I went through didn't seem to demonstrate what I want. I would like to apply an impulse (not force) to an object at a specific position on that object. How would I go about doing this in code? (I've created the objects already). I'll be using XNA and SL, but I guess the code for this method would be the same. thanks

\$\endgroup\$
5
\$\begingroup\$

I haven't used it, but a quick google search turned up this thread.

It makes sense since all physics engines, in my experience, give you the ability to apply impulses and/or forces. So look for the ApplyLinearImpulse/ApplyAngularImpulse functions. They enable you to specify points where you apply the impulse.

\$\endgroup\$
  • \$\begingroup\$ Thanks, I didn't see that when I searched, but looks like what I need :) \$\endgroup\$ – Skoder Dec 27 '10 at 15:41
0
\$\begingroup\$

You want to use the Body.ApplyLinearImpulse, or you can directly set the Body.LinearVelocity.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.