Reputation: 2040
I have a single dynamic body(Bike) with three circular fixtures: frontTyre, backTyre and body. When I apply force on the bike, it moves and jumps off the click. The bike doesn't have fix rotation, so it rotates and doesn't land properly on the terrain. I have two buttons for rotating bike: one for right rotation and other for left rotation. I tried giving torque to the bike when it is air, but not able to control the rotation. What is the best approach for such a controlled rotation. Any help would be greatly appreciated.
Upvotes: 0
Views: 103
Reputation: 1207
check this out , you can fully control the rotation using this http://www.iforce2d.net/b2dtut/rotate-to-angle
Upvotes: 1