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 / Object Angle Y in real 360 range?

Author
Message
Kenjar
13
Years of Service
User Offline
Joined: 17th Jun 2005
Location: TGC
Posted: 24th Mar 2016 19:21
Hi guys,

Got a really old dbpro problem here which is that when I call the Object Angle Y() command, it doesn't return a sensible 0 - 359 number. Instead is does that Euler nonsense where 0 to 90 then 90 to 0 then blah blah blah.

Anyway, is there a command in dbpro that simply reports an objects orientation in good old degrees. Or at least an easy conversion function?

Many thanks.
Symon
15
Years of Service
User Offline
Joined: 29th Aug 2003
Location:
Posted: 24th Mar 2016 20:06
have you tried Lowlogics rotation code2 https://forum.thegamecreators.com/thread/96773
Ortu
DBPro Master
10
Years of Service
Recently Online
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 24th Mar 2016 21:53
I'm not sure I've seen object angle y () do what you are describing, or I'm not understanding. I've never had issues with the command.

Would you mind posting short code that can reproduce the issue?
WickedX
9
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th Mar 2016 22:21
The difference is between using free flight and Euler commands. The free flight functions Turn Object, Pitch Object and Roll Object do not set the objects angles the same way as Rotate Object, Xrotate Object, Yrotate Object and Zrotate Object.
Kenjar
13
Years of Service
User Offline
Joined: 17th Jun 2005
Location: TGC
Posted: 24th Mar 2016 22:40
The values are coming off the DarkPhysics engine, trying to apply a force then get the angle, but the angle returned is coming back as free flight/ euler/ whatever.
WickedX
9
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 25th Mar 2016 00:08 Edited at: 25th Mar 2016 00:09
Idk, Dark Physics is returning the proper angles for me using Wrapvalue (Object Angle Y (ObjID)).
Kenjar
13
Years of Service
User Offline
Joined: 17th Jun 2005
Location: TGC
Posted: 28th Mar 2016 01:31
Are you sure about that? At first glance it appears to be true, but when applied to something like the camera follow command you will see that the camera swings around wildly. The numbers at first glance are fine, but upon careful observation I believe you'll find them messed up.
WickedX
9
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 4th Apr 2016 22:42 Edited at: 4th Apr 2016 22:43
Set Camera To Follow X, Y and Z values are not angles, they're position data. Maybe I'm confused. As Ortu suggested,
Quote: "Would you mind posting short code that can reproduce the issue? "

Login to post a reply

Server time is: 2018-09-24 02:53:57
Your offset time is: 2018-09-24 02:53:57