title: Unity Rotation & Quaternions
body: <p>I'm learning Unity and I have a question.</p>
  
  <p>I dont understand why this line resets the rotation to 0,0,0. All I'm doing is re-assigning its euler values? </p>
  
  <pre><code>transform.rotation = 
               Quaternion.Euler(transform.rotation.x,
                                transform.rotation.y,
                                transform.rotation.z);
  </code></pre>
  
  <p>The reason I'm doing this is because I need to lock one axis and keep the others changing. So I thought I could do it like this after the changes in x and z axes occur:</p>
  
  <pre><code>transform.rotation = Quaternion.Euler(transform.rotation.x,
                                        LOCKED ROTATION VALUE,
                                        transform.rotation.z);
  </code></pre>
  
  <p>I'm sure its simple but I cant find out whats wrong.</p>
  
  <p>Thanks in advance.</p>