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 DBPro Corner / Sprite Question

Author
Message
xxelixx
15
Years of Service
User Offline
Joined: 6th Dec 2008
Location: CodeLand
Posted: 21st Aug 2009 06:37
Hello, I was wondering why when you use the Rotate Sprite command it rotates at the top left and not the middle. If any one can help me fix this I'd appreciate it.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 21st Aug 2009 06:53 Edited at: 21st Aug 2009 06:54
try: (using 10 as an example sprite number)

offset sprite 10, sprite width(10)/2, sprite height(10)/2

you might have to add 1 to the math above depending on whether or not your sprite dimensions are even or odd numbers but play around with the commands mentioned until you get the effect you're looking for.


xxelixx
15
Years of Service
User Offline
Joined: 6th Dec 2008
Location: CodeLand
Posted: 21st Aug 2009 06:58
Thanks for the help.

Login to post a reply

Server time is: 2024-11-25 03:01:57
Your offset time is: 2024-11-25 03:01:57