Thread View: rec.games.programmer
1 messages
1 total messages
Started by Richard Barry Ling
Tue, 04 Aug 1992 03:18
Flight simulator control
Author: Richard Barry Ling
Date: Tue, 04 Aug 1992 03:18
Date: Tue, 04 Aug 1992 03:18
33 lines
2231 bytes
2231 bytes
Yo all. I'm trying to program a flight simulator using a language with a 3D graphics capability. This package allows me to model an object, then rotate it around the axes, position it, move it forward a certain distance etc, but I'm having serious trouble working out how to translate the controls for the aircraft into angles around the X, Y and Z axes. I need to convert relative changes in the pitch, yaw and roll of the plane into absolute angles. In short, my trigonometry sucks. The problem: I have to give the 3D package 3 numbers - the angle to rotate about the X axis (horizontally across the screen), the Y axis (vertically across the screen), and the Z-axis (perpendicular to the screen). The computer rotates the plane about X, Y and Z in that order, and displays the result. Imagine viewing the plane from behind: If I pitch the nose up (rotate about X axis) then roll the plane thru 180 degrees (rotate about Z) the nose ends up pointing downwards, which is not very desirable. Or if I roll 45 degrees (Z axis), then pitch (X-axis), the Y-axis angle has to change as well. I imagine there must be some nice mathematical formulas out there to handle these rotations. I have lost sleep, sanity, and large amounts of my hair over this problem. Any and all help appreciated. *******************************> NOTICE! <********************************** PLEASE REPLY VIA E-MAIL, since our newsfeed is currently 2 weeks behind... **************************************************************************** --------------------- Richard. u9147603@cs.uow.edu.au --------------------- "The rooster stared back at me, his power and confidence almost overwhelming. Down below, a female paused warily at the coop's entrance. I kept the camera running. They were beautiful, these 'Chickens in the mist'." - Gary Larson
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads