Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / command to automatically rotate sprite, animation.

Author
Message
Hubert BAYRE
2
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 19th Jan 2018 10:31 Edited at: 19th Jan 2018 11:03
Hello !
Is there a way to use a command to automatically rotate a sprite arround its offset (animation) ? 0 to 360. This is for a cool mouse pointer.
(before i code my own)
Thanks.
Bengismo
2
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 19th Jan 2018 11:56 Edited at: 19th Jan 2018 11:59
Just...call this in a loop

SetSpriteAngle( ID, GetSpriteAngle( ID ) + (GetFrameTime()*200))

The 200 controls how fast the rotation is .... 360 = one rotation a second.


Alternatively you could set up a tween to do this but i wouldnt bother as its so simple.
Hubert BAYRE
2
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 19th Jan 2018 12:42
Many thanks.

Login to post a reply

Server time is: 2020-04-08 17:52:31
Your offset time is: 2020-04-08 17:52:31