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 Professional Discussion / Angle between 2 rotated objects

Author
Message
Ramus73
14
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 2nd Apr 2018 09:25
Wow! People still use these forums. Have been using DBp for several years now but my math is pretty terrible. I'm trying to find the Y angle between 2 rotated objects with the result being relative to 1 of the objects. Basically I am making a top down space shootemup with the camera rotating around and the players ship always pointing north and I'm trying to have an arrow sprite that points towards a certain object. Now I have used Atanfull but the player Y angle (Object Angle Y) doesn't give a value between 1-360, for some reason it gives -90 to 90 and then back again which means I can't use it in the calculation?
Ramus73
14
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 2nd Apr 2018 13:23
Never mind, I solved it myself

Login to post a reply

Server time is: 2024-04-19 21:19:49
Your offset time is: 2024-04-19 21:19:49