Simple X, Y, Z axis question

Started by
6 comments, last by Hazzsoft 22 years, 2 months ago
I''ve been trying to read thru Beginning Direct3D Game Programming and am confused by something the author writes. Specifically, (I''m directly copying what is in the book, pg. 80, second paragraph) "Consider the following example. An airplane, let''s say an F22, is oriented such that its nose is pointing in the positive Z direction, its right wing is pointing in the positive X direction, and its cockpit is pointing in the positive Y direction. So the F22 local X, Y, and Z axes are aligned with the world X, Y, and Z axes. If this airplane is rotated about 90 degrees around its Y-axis, its nose would be pointing toward the world negative X-axis, its right wing toward the world negative Z-axis, and its cockpit will remain in the world positive Y direction." The part I feel is wrong is that after the rotation, the planes right wing would be pointing toward the world negative Z-axis. I think it would be pointing toward the world POSITIVE Z-axis. Even if you rotate it the other way then the nose would be pointing toward the POSITIVE X-axis not the negative. Am I correct? The book is difficult to understand to begin with, but now I feel I can''t even trust what the guy is explaining. Any feedback would be appreciated. Thanks.
Advertisement
that sounds right to me, basically the plane is takeing a left... the author confuses me with the cockpit, because it points towards the nose.. and is not projected from the center..
You''re both right.

Since he doesn''t state WHICH way its rotating.

You''re correct if the spin around the Y axis is 90 degrees to the RIGHT. He is correct if the spin around the Y axis is 90 degrees to the LEFT.
well Hazzsoft said he thought both ways...
Well, from your description, if the plane rotated +90 degrees about the Y axis, then the nose would point along the POSITIVE X axis, and the right wing along the NEGATIVE Z axis. This is only valid for D3D. In OpenGL, the positive Z projects out of the screen.
I conclude that he means -90º on Y
Ignore the author - he's wrong!

Or, to be fair, there's a misprint.

Edited by - Shag on February 4, 2002 11:14:00 PM
Thanks for the quick feedback. I thought I had it right.

Hazzsoft

This topic is closed to new replies.

Advertisement