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.

2D All the way! / Rotating sprite around center point

Author
Message
SirReal
20
Years of Service
User Offline
Joined: 20th May 2003
Location:
Posted: 19th Jun 2003 11:10
Hi,

I seem to be running into a wall. I have a sprite with a logo in the center of the screen.

Then I add a sprite of a decorated ring that surrounds the logo

I want the ring to rotate IN PLACE, but when I use rotate sprite, it seems to pivot around the X,Y of the sprite's upper left corner, not the X,Y of the sprites center.

Is there a way to do this?

SirReal
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 19th Jun 2003 14:09
what size is the sprite?

say its 64 pixels wide and high

the offset to the center is 32

using an offset of 32 in both the x and y should solve it.

indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 19th Jun 2003 14:12
see example attached below for an indepth review

SirReal
20
Years of Service
User Offline
Joined: 20th May 2003
Location:
Posted: 19th Jun 2003 17:41
Well, that was simple.

Thanks

indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia

Login to post a reply

Server time is: 2024-03-02 19:11:54
Your offset time is: 2024-03-02 19:11:54