• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

# Simple X, Y, Z axis question

This topic is 6194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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..

##### Share on other sites
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.

##### Share on other sites
well Hazzsoft said he thought both ways...

##### Share on other sites
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.

##### Share on other sites
I conclude that he means -90º on Y

##### Share on other sites
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

##### Share on other sites
Thanks for the quick feedback. I thought I had it right.

Hazzsoft

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 28
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634113
• Total Posts
3015570
×