How to rotate an image?

Gadwin

Villager
Member
Joined
Mar 18, 2012
Messages
19
Reaction score
0
First Language
Filipino
Primarily Uses
Hi All,

Do you guys know how to rotate an image that I have just created. For example i want the image to rotate around 54 degrees.

Below is the code that I am working on but it seems i cant find a predefined function for rotate.

this.background = new Sprite();

this.background.bitmap = ImageManager.loadSystem($.Param.background);

this.background.x = 50;

this.background.y = 400;

this.background.bitmap.rotateHue(45);

//this.background.bitmap.rotate(45);
 

Ramiro

Now with an army of Mecha-Ralphs!
Veteran
Joined
Aug 5, 2015
Messages
858
Reaction score
364
First Language
Spanish
Quite simple:

Code:
this.background.angle = 90; // rotates the image 90 degrees...
 
Last edited by a moderator:

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
try use rotation
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top