I'm working on a top-down car, based on this code:
viewtopic.php?f=8&t=1547
The car has 5 boxes, joined together with b2RevoluteJoint for the front wheels and b2PrismaticJoint for the back wheels. wheels joints connect to the car body.
I'm trying to rotate the car body (where all the wheel joints are connected) to set an initial orientation using body.SetAngle(_angle * Math.PI / 180.0); The problem is that the body is not rotated to the exact angle, but ends up a bit off - I guess the joints are influencing the rotation somehow? E.g if I specify and angle of 94 deg, the car is rotated to 90 degrees.
What is the proper way of rotating a complex object like this with multiple rigidbodies and joints?
thanks,
Patrik
viewtopic.php?f=8&t=1547
The car has 5 boxes, joined together with b2RevoluteJoint for the front wheels and b2PrismaticJoint for the back wheels. wheels joints connect to the car body.
I'm trying to rotate the car body (where all the wheel joints are connected) to set an initial orientation using body.SetAngle(_angle * Math.PI / 180.0); The problem is that the body is not rotated to the exact angle, but ends up a bit off - I guess the joints are influencing the rotation somehow? E.g if I specify and angle of 94 deg, the car is rotated to 90 degrees.
What is the proper way of rotating a complex object like this with multiple rigidbodies and joints?
thanks,
Patrik