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.

Dark GDK / Interaction between pitch and roll commands

Author
Message
Zorcan
13
Years of Service
User Offline
Joined: 10th Jan 2011
Location:
Posted: 16th Jan 2011 14:35
I'm trying to create a 3D flight sim. I'm using pitch, roll and turn commands to control the object.

I've set up a display to show each of the 3 angle values

I've linked the arrow keys to control pitch and roll and can control the object's attitide properly using them.

When I rotate the model purely around the pitch axis, only the displayed pitch angle changes. This is true no matter what the starting orientaton of the model is.

When I rotate the model purely around the roll axis, then the pitch and turn angles also change. This is true no matter what the starting orientaton of the model is except where the pitch and turn orientation are both 0. The maximum amount by which they change during a complete rotation about the roll axis varies depending upon the starting orientation.

Is this a bug or some strange (and unhelpful?) functionality??
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 16th Jan 2011 17:11
Quote: "Is this a bug or some strange (and unhelpful?) functionality??"


The pitch, roll, turn commands work on a local coordinate system and not a global coordinate system. They are a little incompatable with the usual dbRotateObject() command and also mess up your angles a little.

Zorcan
13
Years of Service
User Offline
Joined: 10th Jan 2011
Location:
Posted: 16th Jan 2011 22:42
Thanks Matty - is there any way to determine what the angle values are?

It is the real world values I'm interested in.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 17th Jan 2011 15:07
Quote: "is there any way to determine what the angle values are?"

As said, global rotations angles are done with dbRotateObject, and you can retrieve those angles with the dbObjectAngle functions.

To know the local rotation angles for turn/pitch/roll, accumulate in a corresponding variable the value of each local rotation performed.

Also, do not mix global and local rotations, always perform global rotations (if any) and then the local rotations

Login to post a reply

Server time is: 2024-06-28 00:48:27
Your offset time is: 2024-06-28 00:48:27