Hi,
In continuing the development of my cannon game(tm), I encountered this issue, which I hope you can help me resolve.
I'd like the flying character to rotate upwards by a 15 degrees everytime the touch function is enabled (or mouse clicked). This action will also extend the trajectory path. The more acute the facing angle (i.e. character looking upward), the less the trajectory extension.
At the moment, it will not go past 0 degrees (horizontal). Also, from what I understand of how angle works in C2, 0 degrees face right and increase clockwise, as shown in the image below.
<img src="http://i.imgur.com/EQiXhHW.png" border="0" />
Is it possible to set the default 0-degree angle to point upward, so 90 degrees will be facing right and 180-degrees pointing down?
I think that it will help with the math calculations. At the moment I'm assuming going from 0 minus the 15 degree angle goes into negative territory rather than 345 degrees, as it should.
Is there a workaround for this?
Also, when the "Flying" value reaches 0, the rotation function stops working and the character falls down to the ground. How do you disable the touch function once it reaches 0?
Let me know if you need further clarification.
Thanks.
solved: Couldn't have been simpler - rotated the player character 15 degrees counter-clockwise every touch. I was just over-complicating things by thinking like a programmer :)
Occam's razor strikes again.
Very elegant, C2!