I'm trying to make a layer rotate in my game depending on how far the player is from the center of the layout.
So I've got this code:
<img src="http://i.imgur.com/B9Zg8q7.png" border="0" />
And it works just fine, but I'm having trouble doing the same thing inverted if the player X position is on the left side of the layout.
The problem is that since the default layout angle is 0 (pointing right), if I need it to go negative it goes crazy and everything starts spinning.
Is there anything I can do?