Physics Body Shape Flipper

Vote up!

This function flips a single or multi-element physics body and returns the flipped shape declaration for usage within the "physics.addBody()" API. Currently, this version only supports horizontal flipping (reflection across a theoretical center vertical axis). This function handles the proper clockwise ordering of the vertices in the flipped shape, assuming that you declare the original shape's vertices in clockwise order (required by Corona).

Brent Sorrentino