setFlipX works great to point your 2D side-scrolling character in the other direction, but if you have associated box2D bodies it is another matter. box2D bodies won't simply match up, naturally. I see very little on this issue (Getting started with Box2D), wondering if there are some folks who can point to successful solutions they've found. So far I'm thinking along these lines:
1) Come up with some mathematical way to flip the box2D bodies. Theoretically should be possible, but I don't really know that. Possibly complex and thorny math, and also, what happens to the box2D joints? If I move the bodies to match the flipped animation won't I also need to adjust the joints else they get completely weird, with knees bending backwards, etc?
2) Have 1 skeleton but with different left and right animations for every state. This way we never call setFlipX, we simply set the animation to 'run_right' instead of 'run_left' because we have separate animations for those. We don't have a single 'run' state. More overhead in terms of creating animations this way.
In terms of box2D bodies though there are still the problems: if you use the same skeleton but just put the limbs in a 'flipped' position the joint constraints will be just as off as with the mathematical method. So even if you use a single skeleton you probably need either 2 sets of box2D bodies or to create a new set of bodies every time the character flips direction.
3) Have two 2 skeletons, turning them on and off. Body problems are still the same. But you only have one 'run' state and not two (eh, big deal...) when telling character what to do.
4) Instantiate a new skeleton every time a guy flips direction. Am I going to see a frame rate impact every time a guy changes direction because I'm creating a new skeleton and set of corresponding bodies? My characters have about 11 slots per skeleton, I'd like to put a bunch of them onscreen.
If you're creating a new skeleton you're obviously creating new bodies to match with this method.