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.

Bug Reports / [DGDK] dbObjectAngleY returns wrong angles in free flight mode

Author
Message
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 8th Aug 2011 08:49
dbObjectAngleY returns wrong angles when the object is turned in free flight mode. Attached is the project to reproduce the problem.

As the object is turning around, the angles should go up from 0 to 180, then from -179 to 0 (so that I get angles between 0 and 359 when I use dbWrapValue on them).

Instead, it counts up from 0 to 90, then back down to 0 again in the second quarter of the circle, then goes from -1 to -89, then from -89 to -1. The values in the second and third quarter of the circle are wrong.

In contrast, dbObjectAngleX and dbObjectAngleZ work correctly, I verified that by using dbPitchObjectDown and dbRollObjectLeft and displaying the angles around the appropriate axes. It's only dbObjectAngleY that has a problem, and only in free-flight turn. (When dbYRotateObject is used, then dbObjectAngleY returns the same angles as were set by dbYRotateObject, so that is OK.)

I tested this with a character model as well, not only with a primitive and the result was the same.

Attachments

Login to view attachments
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 9th Aug 2011 12:40
I'd like to add that the problem exists in Dark Basic Professional as well. I tested it with PureGDK.

Login to post a reply

Server time is: 2024-04-25 16:45:22
Your offset time is: 2024-04-25 16:45:22