This project has moved. For the latest updates, please go here.

2D car with a twist.

Topics: Developer Forum
Apr 18, 2008 at 5:07 PM
Edited Apr 19, 2008 at 3:49 PM
Hi there I am fairly new at using Farseer and I am loving it so far!

But I have come across a problem which I cannot seem to solve, other than changing my game completely. Which I cannot do, anyhoo here is the problem.

I have a car, and I have created Revolute Joint's to attach the car wheels to the car, and allow the wheels to spin on axis. Now this works great whilst using torque to rotate the wheels and thus moving the car. It’s perfect apart from one thing; it all looks too rigid as it lacks suspension.

This is where it gets tricky the obvious solution I thought would be to attach the rev joints to another body (separate from the car frame) and then attach that body to the car frame using a linear spring. Now I am pretty sure that would work if the wheels were under the car but in fact the wheels are at either end of the car to allow the car to flip, and drive upside down.

O-O < like that

So if I try to attach a spring this just stops the wheels rotating and the car not being able to move.

Any help and thoughts on how I could implement a solution will be greatly appreciated.

an example of how the car looks.

EDIT: I just tried to attach both rev joints to another joint and then attaching that to the car but then the car bounces once then flips out every and just flies off screen.

EDIT2: I found a quick solution, to just make the body of the car smaller and reduce the mass makes it seem like it has suspension. This will have to do until I think of something else I think.
Apr 24, 2008 at 4:45 PM
Try using just the revolute joint but adjust the BiasFactor and Softness

BiasFactor between .05 and .2
Softness between 0 and 1 (1 is hard)

You will need to tinker with the value till you get something that works, but that should soften things up for you.