Truck Game

Jul 30, 2010 at 5:56 AM

Hi Guys,

I'm trying to re-create the truck game from http://www.emanueleferonato.com/2009/04/06/two-ways-to-make-box2d-cars/ in Farseer 3.

Test code is here.. http://pastebin.com/6fpjVY88

I can't get the wheels to work correctly.

The revoluteJoint is trying to spin the whole cart instead of the wheel.

currently I have motor1 = new RevoluteJoint(axle1,wheel1, Vector2.Zero);

if I swap the 2 bodies around, then the anchor is in the wrong spot, I haven't been able to figure out how to get it right.

 

Would someone mind having a look and telling me what I'm doing wrong?

 

Thanks a lot!

Aug 2, 2010 at 10:11 AM

Have a look here, where someone was trying to do the same thing: http://farseerphysics.codeplex.com/Thread/View.aspx?ThreadId=220808

He posted some code, so maybe have a look and see if you did anything differently.