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.

AppGameKit Classic Chat / convert and angle in degrees to a 2D vector

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th Jan 2016 03:32 Edited at: 18th Jan 2016 03:39
I've used a combination of code (c and phaelax's vector routines) to try to convert an angle in degrees to a vector and have come up with the attached code. Unfortunately no matter what angle i feed it i always get x=1, y=0
Any help would be greatly appreciated

Sign up for NaGaCreMo!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th Jan 2016 04:09
i figured it out. the sin/cos functions work off angles not radians. again, i'm not reading the doco carefully enough

Sign up for NaGaCreMo!

Login to post a reply

Server time is: 2024-11-17 02:52:34
Your offset time is: 2024-11-17 02:52:34