Easier way to rotate/transform an image?

64 views
Skip to first unread message

Moshe Adriano Yosef Feit

unread,
Apr 25, 2016, 1:37:58 AM4/25/16
to haxef...@googlegroups.com
Pardon me I asked too much,

But I found many interesting, and "unusual" mechanism in HaxeFlixel. For now, I found this problem. I see many tutorials about this in Haxeflixel. But I think they're too complicated - only to accomplish this.

This is the graphic: http://imgur.com/MbnxqCj

As you can see, there's no animation sprite. I want to rotate it by 90 degrees. To simulate the animation, I want to rotate it in 3 steps, each by 30 degrees.

My question is, is there an easier way to rotate an image? Something like: pygame.transform.rotate() in PyGame, or like .rotate() in HTML5?

But not with loadRotatedGraphics(). Correct me if I'm wrong, but what I understand so far is this method's not rotating "on screen".

Thank you. :)

Dlean Jeans

unread,
Apr 25, 2016, 1:59:34 AM4/25/16
to HaxeFlixel
// set a sprite's angle to 30 degree
sprite
.angle = 30;

// rotate a sprite by 30 degree per second
sprite
.angularVelocity = 30;

For more see this
Reply all
Reply to author
Forward
0 new messages