I'm working on a flight simulator for a college class, and it's almost all done. I just have one problem left. I'm trying to have an alternate view of the plane, meaning instead of being in the cockpit, to show the plane from the outside.
So I have the plane coordinates, and when I draw the plane, and start flying, the plane stays in place and the camera continues to fly. here's a bit of my code:
glTranslated(...) // camera rotations and
tranlslation by plane
drawLand(); //this is fine
drawPlane();//in drawPlane I'm drawing the plane using the plane coordinates, but it just stays in place when I start flying.
I tried using glPushMatrix() and then glLoadIdentity and then drawing the plane and I tried without it, and many other options, but nothing works. Please Help!!
Thanks in advance.