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.

Code Snippets / [DBP] - Rotate a sprite about its center

Author
Message
Rapidrory
14
Years of Service
User Offline
Joined: 21st Aug 2009
Location:
Posted: 23rd Apr 2012 22:01 Edited at: 24th Apr 2012 00:39
I'm sure's this has probably been done before, but here is a useful little function to rotate a sprite around it's centre regardless of it's shape. I've included a bit of demo code to give you an idea how to use it.



EDIT:
Alternatively it turns out you just use:



...Well this is embarrassing

Login to post a reply

Server time is: 2024-04-24 18:24:14
Your offset time is: 2024-04-24 18:24:14