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 / Pointing images

Author
Message
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 10th Aug 2009 14:48
Is there anyway to rotate an image to face the mouse cursor?

#ifdef __NEWBIE__
MakeAnAwesomeGame(lots of badies, lots of guns, lots of stuff to do, BIG level)
#endif
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 10th Aug 2009 14:49
What I mean is, how do I rotate an image until it appears to be facing the co-ordinates of the mouse cursor,

And help would be appreciated

#ifdef __NEWBIE__
MakeAnAwesomeGame(lots of badies, lots of guns, lots of stuff to do, BIG level)
#endif
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 10th Aug 2009 17:16
Images are 2D, they will only every have an X and a Y co-ordinate, they arent 3D so cant be rotated like you are desribing.

You can however imitate a rotating image by shrinking it sideways and skewing it a little, but I think the easiest way to get what you are after would be to texture your image to an object and rotate the object.



Something like that, then you would rotate the object to match your camera orientation in whatever way you need

If it ain't broke.... DONT FIX IT !!!
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 10th Aug 2009 17:29
Um, welcome to the world of sprites...?

Just set the sprite angle... well, look up dbATANFULL.

tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 11th Aug 2009 01:00
Yeah, sorry, I ment sprites. Thanks for that function though

#ifdef __NEWBIE__
MakeAnAwesomeGame(lots of badies, lots of guns, lots of stuff to do, BIG level)
#endif
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 11th Aug 2009 01:44
hehe no worries, was late here when I answered your question and I didnt even think you may have meant sprites lol...

note to self : goto bed earlier...lol

Hope you figure it out anyway

If it ain't broke.... DONT FIX IT !!!
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 11th Aug 2009 11:01
dbATANFULL didn't work, it rotated wierdly.. and more ideas?

#ifdef __NEWBIE__
MakeAnAwesomeGame(lots of badies, lots of guns, lots of stuff to do, BIG level)
#endif
tomtetlaw
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location:
Posted: 12th Aug 2009 09:39
bump

#ifdef __NEWBIE__
MakeAnAwesomeGame(lots of badies, lots of guns, lots of stuff to do, BIG level)
#endif
Krisacz
15
Years of Service
User Offline
Joined: 3rd Mar 2009
Location: UK, Manchester
Posted: 12th Aug 2009 10:50
Try that:

Login to post a reply

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