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 / EZro_AngleBetweenPoints() Possible Bug?

Author
Message
Ekko
22
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 28th Jun 2011 10:18 Edited at: 28th Jun 2011 10:21
I'm not sure if I'm using this tool correctly, but I feel that when running my code below, both angle should be the same. Can anyone confirm this with me or correct my logic?
Thanks!

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 28th Jun 2011 10:58 Edited at: 28th Jun 2011 11:06
[edit]
blagh I don't know what I'm talking about. The issue that I forget is:

if you say that an object is angled 90 degrees on the y axis, is it pointing backwards on the x axis, or forward on the z axis? (your code assumes backwards on the x axis)

Secondly, I'd bet that the function ezro_anglebetweenpoints can only return a value inbetween -90 and 90 (or maybe 0 and 180). This is a feature, not a bug!


Why does blue text appear every time you are near?
Ekko
22
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 28th Jun 2011 11:51
I'm pretty sure It's supposed to return a value between 0 and 180. When I force the angle to be 15 degrees it returns 3.41509e-006. I'm using objects just as a visual reference; their rotation does should not affect the output. The following code is returning 60 it should be 90.
Ekko
22
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 29th Jun 2011 08:52
Here is a working funtion until the bug is fixed:

Login to post a reply

Server time is: 2026-07-10 12:02:10
Your offset time is: 2026-07-10 12:02:10