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

Spring : how to do it

Topics: User Forum
Dec 3, 2012 at 4:31 PM



I'm playing with farseer trying to do a sidescroller racing game, but I'm unable to create a damper/spring for the two wheels of the car. I've seen that a long time ago there was a namespace named Springs, but I can't find it anymore. I've been trying with a Prismatic Joint, but I can't make it work like a spring.


Could you please give me any hint of a link to an example with dampers/springs?


Thanks a lot!


Dec 7, 2012 at 12:37 AM


Use the LineJoint in FPE 3.3.1 and control the spring using Frequency and DampingRatio on the LineJoint. In FPE 3.5, there will be a WheelJoint with more realistic behavior.

Dec 22, 2012 at 11:14 PM

One little more question... how do I limit the max length of the LineJoint? Box2D has UpperLimit & LowerLimit for the LineJoint but I can't find it anywhere in Farseer.


I had a look at the 3.5 WheelJoint but unfortunately I have the same problem.


Thanks a lot! :)


Dec 27, 2012 at 10:16 AM

I just tried the WheelJoint in 3.5. It works ALOT better than any other joint for suspension!

Dec 28, 2012 at 2:04 AM

The LineJoint does not have limits, and the version of LineJoint that is included in the newest version is not the one from the Box2D 2.1.2 distribution. The LineJoint in Box2D changed 3 times (if I remember correctly) and what you see in FPE is the latest one before Erin renamed the LineJoint to WheelJoint.

If you need the old LineJoint that had limits, you can download FPE 3.2 here.