Corona using object.Xscale to flip an object will cause the object to look skewed when calling object:scale(x,y)

142 views Asked by At

when trying to scale the object down on both axis the image will look skewed like, stretching more on 1 axis. I called object.Xscale=-1 to flip it. Although it works it will cause object:Scale(x,y) to have a problem with scaling. I removed the object.xScale and there seems to be no scaling issue with the display object. What can i do to solve this?

1

There are 1 answers

3
joehinkle11 On

If you could post your code I might be able to answer you question a bit better. Until then, I can only speculate what the issue may be.

I recommend that if you do not want the xScale and yScale differing after alterations, try doing this after each change.

object.xScale = 2
object.yScale = math.abs(object.xScale)

By setting the yScale to the absolute value of xScale, you will keep it upright and the same size despite xScale possibly being negative or positive.

Hope this helps,

Joe.