问题
I have just jumped in to using scene kit for iOS for the first time. What I am trying to do is import a .dae file, and rotate the object in code. What is happening is that when I import my file, I see that it is oriented the way I would expect.

This is great, now I want to rotate it so that the longer end goes horizontally. With my coordinate system this should be a 90 degree rotation around the Z axis. Doing that in the graphical part of xcode shows this.

The problem comes in when I start to manipulate this in code. If I undo the rotation in the graphical interface and try to perform it in code I get unexpected behavior.
If I start with no code changes, the simulator shows this

If I perform a code rotation around the Z axis with this code
// create a new scene
SCNScene *scene = [SCNScene sceneNamed:@"art.scnassets/board.dae"];
SCNNode *board = [scene.rootNode childNodeWithName:@"board" recursively:NO];
board.rotation = SCNVector4Make(0, 0, 1, M_PI/2);
I do not see the expected behavior in the simulator, I get this

// create a new scene
SCNScene *scene = [SCNScene sceneNamed:@"art.scnassets/board.dae"];
SCNNode *board = [scene.rootNode childNodeWithName:@"board" recursively:NO];
board.rotation = SCNVector4Make(0, 1, 0, M_PI/2);
This yields the following, which is what I want.

Now for the real question, why do I have to rotate around a different axis in code? In this instance I was able to make it work, but in others like my camera, I can not. I think there must be some sort of coordinate shift that I am missing once something goes to code.
Thanks in advance.
来源:https://stackoverflow.com/questions/31859597/node-rotation-in-scenekit-scenekitrotation