object.yScale

Overview

Retrieve or change the scale of the object in the y direction. The scaling occurs around the object's anchor point.

You can flip a display object vertically by passing a negative value to object.yScale as seen in the example below.

Valid examples include 1.0 for 100%, 2.0 for 200%, or 0.5 for 50%.

Gotchas

The yScale property can also be set as part of the object:scale() function.

When a display object is converted into a physics object, scaling the object will change the visual size, but it will not affect how the physics engine regards the object size. This could result in unpredictable results when interacting with other physics bodies.