Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
Thanks, I didn't see that when I searched, but looks like what I need :) –  Skoder Dec 27 '10 at 15:41
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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