I would like to model a rotating "turret" on top of a tank-like object in 2D from the side view like pictured here:
tank with turret http://uofitorn.net/static/images/tankwithbox2dturret.png
Notice the faint outline of a gun protruding to the upper left courtesy of libgdx's debug renderer (the actual gun sprite is not being rendered).
How do I best implement this using Box2d? Should I use two bodies? If so, how? Or one body with two fixtures?
I tried using two bodies connected by a Revolute Joint, but the turret "gun" does not maintain a constant angle but instead rotates down until it is vertical and then just hangs there.
Or should I not model the turret aspect of the tank in box2d at all?