Game Development Reference
In-Depth Information
Setting the rotation of a sprite
The image_angle variable allows users to set the rotation of a sprite in degrees. A high-
er number rotates the sprite in an anticlockwise direction.
A value of 0 would have the sprite with no rotation, a value of 90 would have the sprite ro-
tated 90 degrees to the left, a value of 270 would have it rotated 270 degrees to the left, and
so on.
The following is the example code:
image_angle=90; //pointing up
Search WWH ::




Custom Search