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

LineJoint strange rotation behavior

Topics: User Forum
Apr 14, 2011 at 8:25 PM


I'm currently using FP 3.3 for a dirt bike game. Based on GameDemo1 I've attached two circles with LineJoints to a PolygonShape. The bike is accelerated using Body.ApplyForce and rotated by Body.ApplyTorque (ApplyAngularImpulse was also tried). The problem that I have is the following:

When in the air, the bike stops rotating at some point, while the linear velocity remains ok. If the rotation has stopped, even applying additional Torque has almost no effect. In rare cases it seems like something has winded up, as the bike gets some torque when leaving ground again.

I'm pretty sure, it has to do with LineJoint, because if I build the same bike attaching two CircleShapes to a PolygonShape, this behavior doesn't appear. I would be very, very grateful if someone had any idea how to get rid of the behavior.

Thanks in advance and KUTGW!




PS: The rotation velocity is as low as in TRIALS HD. Things I've already checked
- continuous collision detection on/off
- disabled sleeping
- shortening LineJoint axis
- changing frequency/damping parameters of spring
- reducing weight of wheels / increasing weights of bike

Apr 16, 2011 at 10:19 PM

The LineJoint is new and untested. It was rewritten to be a car suspension joint in 3.3. You could try using the LineJoint from 3.2 or use another joint.