04-10-2003, 04:51 PM

I am trying to implement a rather simple 3rd person flight sim/flying game.

I'm getting stuck when trying to do the user controls. I've tried a bunch of stuff, now I'm using Quaternions.

So, basically, I keep track of the airplane's local i, j, k vector (representing roll, yaw, pitch). When the user decides to roll, for instance, the axes vectors are rotated around the i vector.

Once the user has input data, and the program is ready to render, it basically has i, j, and k vectors which represent the axes of the airplane.

What I've been trying to do is calculate the angles between various coordinate-planes and rotate by those angles about the axes using glRotatef().

I first calculate the values by rotating about the i, axis, then I deal with yaw, then pitch. Then I use glRotatef to rotate the airplane in the correct orientation. However, when I run this, it gives me totally, totally weird results whenever I try more than one rotation at a time.

Does anyone have any information about how to implement the plane controls, source code, or links to anywhere that I can get information? Thanks for any help at all.

I'm getting stuck when trying to do the user controls. I've tried a bunch of stuff, now I'm using Quaternions.

So, basically, I keep track of the airplane's local i, j, k vector (representing roll, yaw, pitch). When the user decides to roll, for instance, the axes vectors are rotated around the i vector.

Once the user has input data, and the program is ready to render, it basically has i, j, and k vectors which represent the axes of the airplane.

What I've been trying to do is calculate the angles between various coordinate-planes and rotate by those angles about the axes using glRotatef().

I first calculate the values by rotating about the i, axis, then I deal with yaw, then pitch. Then I use glRotatef to rotate the airplane in the correct orientation. However, when I run this, it gives me totally, totally weird results whenever I try more than one rotation at a time.

Does anyone have any information about how to implement the plane controls, source code, or links to anywhere that I can get information? Thanks for any help at all.