This project has moved and is read-only. For the latest updates, please go here.

Moving from Farseer 2.x to 3.0

Topics: User Forum
Aug 23, 2010 at 8:37 PM
Edited Aug 23, 2010 at 8:41 PM

Hi all,

I thought it might be useful to get a thread going to help people make the transition between Farseer 2.x and 3.0, and to get some nice visible answers to common questions in the absence of any formal documentation. I'm personally trying to update an existing game to the new build, so ideally I'd like to swap out my old deprecated 2.0 classes/call for their 3.0 equivalents, and hopefully get it up and running as it was before, but with all the new features/optimisations that 3.0 brings.

So, to start with, could anyone answer me the following:

- My game currently uses LinearSprings and AngleLimitJoints. Neither of these seem to exist in 3.0 - is there an equivalent joint type I can use to get the same functionality?

- Physics bodies used to have functions for ClearForce, ClearImpulse, ClearTorque and ResetDynamics. Any equivalent for these in 3.0?

- Any equivalent for LinearDragCoefficient and RotationalDragCoefficient on bodies?


thanks everyone :)



Aug 23, 2010 at 9:20 PM

1. The LinearSpring can be replaced by DistanceJoint with a low frequency (makes it behave like a spring). Take a look at the TestBed WebTest for a reference.

2. The World object auto clear forces after each step. Do you need to clear forces/impulses on a per body basis and for what?

3. LinearDamping and AngularDamping are the equivalents.