How do I rotate an entity?


(benhuangua) #1

You guys, how can I rotate my entities?

i want to rotate my entities while i am pressing some key. but i can’t find the properties related to the ROTATE.

i wonder if the FlashPunk provides the feature.

Thank you for reply.


(Ultima2876) #2

It’ll be in your graphic. If you’re using an Image graphic, store the variable, something like this:

_myImage = new Image(Assets.BLAH);
graphic = _myImage;

Then you can do:

_myImage.angle = 50;

(benhuangua) #3

@Ultima2876 hey, dude. you know what? you just saved my ass!

appreciate your kind! cool!


(Zachary Lewis) #4