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.

DarkBASIC Discussion / what ever happened to 360 degrees?

Author
Message
ChozoMufin
20
Years of Service
User Offline
Joined: 19th Apr 2005
Location: Columbus, OH
Posted: 1st May 2005 03:26
i always used to think that there were 360 degrees. but evidently there aren't. in my game, for the minimap, i made 4 triangle sprites. 1 of them points left, 1 right, etc.etc. i said if camera angle y()>315 and camera angle y()<45 then i made it use the first sprite and if camera angle y()>45 and camera angle y()<135 then i made it use sprite 2 etc. it didnt work, so i ran a test. i told it to post the camera y angle, and i found out that the degrees go from 0 to 90, from 90 back to 0, from 0 to -90, and from -90 to 0 again, if you keep turning right. why is this??? how can i get my sprite to face the same direction as the plane still? please help.
Ace Of Spades
20
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 1st May 2005 03:28
Quote: " i said if camera angle y()>315 and camera angle y()<45"

it cannot be greater than 315 AND less than 45!

Digitalmodr
Coder_David
[Apolloed ]
ChozoMufin
20
Years of Service
User Offline
Joined: 19th Apr 2005
Location: Columbus, OH
Posted: 1st May 2005 04:21 Edited at: 1st May 2005 04:24
o wait a minute, maybe i should change that to OR or something. whoops!
ChozoMufin
20
Years of Service
User Offline
Joined: 19th Apr 2005
Location: Columbus, OH
Posted: 1st May 2005 04:21 Edited at: 1st May 2005 04:24
but still, why are the angles all wierd, besides that?
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 1st May 2005 07:59 Edited at: 1st May 2005 08:13
I wouldn't know why, but I can suggest a variable that stores the camera rotation (in other words, simulates the camera angle).

I'll check out if I have the same prob
/edit:
nope don't have it, maby you've put in some weird command like SET CAMERA ROTATION XYZ.
Or you could put your code (only the camera code) in a new file and see if there's any change

please reply
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 1st May 2005 23:02 Edited at: 1st May 2005 23:03
wrapvalue() should fix that for you.


"Lets migrate like bricks" - Me
ChozoMufin
20
Years of Service
User Offline
Joined: 19th Apr 2005
Location: Columbus, OH
Posted: 2nd May 2005 04:43
for the 315 to 45 degree thing, benjamin?
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 2nd May 2005 23:43 Edited at: 2nd May 2005 23:52
wrapvalue doesn't fix it becouse the degrees go from 0 to 90, from 90 back to 0, from 0 to -90, and from -90 to 0 again.

post yer code, or portions of it

any difrences between there 2 codes?


please reply

Login to post a reply

Server time is: 2025-05-23 00:04:04
Your offset time is: 2025-05-23 00:04:04