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.

AppGameKit Classic Chat / [SOLVED] Change rotation pivot point

Author
Message
MateiSoft
12
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 21st Feb 2019 16:53
Hello guys,

Any idea on how can I change the rotation pivot of a sprite?

I want to rotate a text and a sprite (the sprite has the same size as the text width and height) and it does not rotate in the same direction.

Thank you!
www.alexmatei.com

The author of this post has marked a post as an answer.

Go to answer

Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 21st Feb 2019 18:06 Edited at: 21st Feb 2019 18:07
This post has been marked by the post author as the answer.
To change the rotation point you use SetSpriteOffset()

By default the rotation point is the centre of the sprite but you can set it to be anywhere you want. Eg...Setspriteoffset(spr,0,0) would rotate the sprite around its top left corner.

Login to post a reply

Server time is: 2024-11-23 05:17:05
Your offset time is: 2024-11-23 05:17:05