So the way I have my project setup, all the images are rendered based on box2d positions and rotations. This has been fine up until now, as I've only dealt with objects that either have a single fixture, or objects that have multiple fixtures, but are all static relative to eachother.
Now I want to have an object that has 'turrets'. The turrets will rotate independent of the parent body, and shoot at the player. The turrets will also be destructable, and once the turrets are destroyed, the collision Filter will change, and the parent body (the enemy ship), will then be destructable.
But I digress, the above was just for context. What I want to do, is to set the rotation of the 'turrets' independently from the rotation of the body that is the ship.
I can't see a trivial way to do this, so can someone recommend an approach that will work here? So far the only solution I can think of is to give the turrets their own bodies, and set them not to collide with the parent, and then match their transform to the parent.
Thoughts??
Now I want to have an object that has 'turrets'. The turrets will rotate independent of the parent body, and shoot at the player. The turrets will also be destructable, and once the turrets are destroyed, the collision Filter will change, and the parent body (the enemy ship), will then be destructable.
But I digress, the above was just for context. What I want to do, is to set the rotation of the 'turrets' independently from the rotation of the body that is the ship.
I can't see a trivial way to do this, so can someone recommend an approach that will work here? So far the only solution I can think of is to give the turrets their own bodies, and set them not to collide with the parent, and then match their transform to the parent.
Thoughts??