[Solved] SceneKit view is rendered backwards


Thanks to Hal for his very helpful suggestion for creating an “scn” file from my scene. After viewing that scene in the scene editor, I realized that everything was reversed left/right because the yaw Euler angle (Y-axis) rotation was reverse of what I thought. So when I set the node’s eulerAngles.y to the desired longitude, I was rotating in the opposite direction of what I wanted. But since the camera had the same error, the spheres at my location were in the correct location but everything else was reversed left-to-right.

The solution was to negate the longitude value for both the spheres and the camera location.

scnCameraArm.eulerAngles.y = Float(radians(yaw))

needs to be:

scnCameraArm.eulerAngles.y = -Float(radians(yaw))

And:

ballArm.eulerAngles.y = Float(radians(Double(lon)))

needs to be:

ballArm.eulerAngles.y = -Float(radians(Double(lon)))

solved SceneKit view is rendered backwards