While reading over the code in lesson 9 I came across the following section (note, tilt
is initialized at 90.0f):
The output of this lesson is a bunch of 'stars' that appear in various colors circling the Z axis and appearing as if they are 'drawn in' to the center.
As I was playing around with the other code trying to just figure out why the output looked the way it does, I couldn't help but wonder why exactly we were:
(A) using a default tilt of 90 degrees to place the Y axis where the Z axis usually is (line 1), and then
(B) rotating the newly aligned Y axis as if it was the standard Z axis (line 2)
I made the following modification and initialized tilt
at 0.0f, and the result output is identical (note that tilt
is still affected by keyboard/mouse input, hence leaving it in):
So, my question is did I miss something, or is there a specific reason / practice for doing that kind of "axis switching"?