Which way does the view face (by default)? Or, SpaceShipBehavior
I was wondering which way the view faces, by default. I.e., does the "eye" of the view point along the x-axis, the y-axis, or the z-axis? (Given an identity transform.)
It would make sense for the view to point along the x-axis, with the y-axis on the "right" and the z-axis "up." Wouldn't it?
I wrote a small program to see for myself which way the view was facing. To my surprise, I found that it was facing in the negative-z direction, with the x-axis on my right and the y-axis up. That seems kind of odd. Can anyone confirm this?
I became interested in this question because I was attempting to better understand how rotations work. I wanted to start with an identity transform, and then rotate it in different directions. I wanted to calculate the roll, pitch and yaw. I also wanted to calculate which way was "forward" (relative to the view) and which way was "right" and "up," for any rotation.
Ultimately I'd like to create a SpaceShipBehavior, which would allow a view to act like a space ship, with six degrees of freedom. The tricky part seems to be moving the space ship "forward" and "right" and "up" (relative to the space ship) for any rotation. (Is there a SpaceShipBehavior out there?--I couldn't find one.)
So I decided to get down to basics, starting with the question, which way does the view face? And the answer seems to be: negative z. up=y.