title: Rotating a node in SceneKit
body: <p>I'm struggling to understand multiple rotations of a node.</p>
  
  <p>Firstly, I created and positioned a plane:</p>
  
  <pre><code>SCNPlane *plane = [SCNPlane planeWithWidth:10 height:10];
  SCNNode *planeNode = [SCNNode nodeWithGeometry:plane];
  planeNode.rotation = SCNVector4Make(1, 0, 0, (M_PI/2 * 3));
  [scene.rootNode addChildNode:planeNode];
  </code></pre>
  
  <p>Then I positioned and set the direction of a spotlight node on this plane:</p>
  
  <pre><code>SCNLight *light = [[SCNLight alloc] init];
  light.type = SCNLightTypeSpot;
  light.spotInnerAngle = 70;
  light.spotOuterAngle = 100;
  light.castsShadow = YES;
  lightNode = [SCNNode node];
  lightNode.light = light;
  lightNode.position = SCNVector3Make(4, 0, 0.5);
  lightNode.rotation = SCNVector4Make(0, 1, 0, M_PI/2);
  [planeNode addChildNode:lightNode];
  </code></pre>
  
  <p>Then I animate the rotation of the light node 90 degrees clockwise around the x-axis:</p>
  
  <pre><code>[SCNTransaction begin];
  [SCNTransaction setAnimationDuration:2.0];
  
  lightNode.rotation = SCNVector4Make(1, 0, 0, M_PI/2);
  
  [SCNTransaction commit];
  </code></pre>
  
  <p>But I'm confused as to why the following rotates the light node back to the original position about the same axis:</p>
  
  <pre><code>[SCNTransaction begin];
  [SCNTransaction setAnimationDuration:2.0];
  
  lightNode.rotation = SCNVector4Make(0, 1, 0, M_PI/2);
  
  [SCNTransaction commit];
  </code></pre>
  
  <p>To me this reads as we're rotating the node 90 degrees clockwise about the y-axis.</p>
  
  <p>Can anyone explain why this works? Or, better yet, suggest a clearer method for rotating a node then returning it to its original position?</p>