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.

Dark GDK / Rotating problems.

Author
Message
Fency Federejshn
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location:
Posted: 12th Dec 2007 21:06
I'm trying to make my sprite which is part of a tile world rotate around its center, and I'm doing that using Offset, which raises MAAAAAANY complications my sprite is 40x40 and when i say that the offset is 20,20 THAT is not the center cause numbers which are a power of 2 have NO CENTER!!!!!

this is a big problem for me i hope someone could help me...

fency federejshn
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Dec 2007 01:28
I cheat. I'd make it an odd sized sprite (41x41) - if a dead on center is that important.

Fency Federejshn
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location:
Posted: 13th Dec 2007 13:01
Yea but isn't a tile sopoused to be a power of 2!!!?

Doesent a tile like 41X41 popuse issues?

fency federejshn
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Dec 2007 14:31
popuse (pop use) issues? I don't understand.

Tile doesn't HAVE to be a power of 2 - though I can see why you would want that for performace reasons - I mean - if you have a bunch of odd-sized textures - its not usually as "cool" with your gfx card as ones that are 1x1, 2x2, 4x4, ....32x32... 128x128 etc.

I Recind. I'm not clear why this is such a problem - MAYBE you need to start thinking in floats for this little thing you're trying to do?!?

For example - You have a tiny 4x4 sprite let's say - and you want to rotate around the "Center" which isn't a dot right? There is no exact center right? Use a Float! Rotate around 2.5 x and 2.5 y

A1 Programmer
16
Years of Service
User Offline
Joined: 20th Nov 2007
Location:
Posted: 14th Dec 2007 05:33
Um... dude... 40 isn't a power of 2.

Login to post a reply

Server time is: 2024-09-29 07:32:21
Your offset time is: 2024-09-29 07:32:21