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 / SETting the angle of a sprite

Author
Message
Ascent321
16
Years of Service
User Offline
Joined: 2nd Oct 2007
Location:
Posted: 29th Jul 2008 21:41
Im trying to make a sprite follow the cursor and point towards it.
The sprite follows the cursor just fine, but it wont point towards it. Im guessing this has to do with the Rotate function not SETTING the angle but adding to the current angle.
How would I fix this?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Jul 2008 23:17
No, it does set the angle, but the GDK uses degrees rather than radians. You only need use the dbSin, dbCos and dbAtanFull functions instead of the standard C++ functions.

Login to post a reply

Server time is: 2024-09-30 03:31:58
Your offset time is: 2024-09-30 03:31:58