Getting the rotation of device around the world origin's y axis in ARKit
问题 I am trying to calculate the rotation of my device when I rotate it around the y-axis in ARKit. For clarification the y-axis in ARKit is the axis pointing upwards perpendicular to the ground. I used eulerangles to get the rotation of the camera like this: var alpha = sceneView.pointOfView?.eulerAngles.y This approximately works when 0=<alpha<pi/2 and when -pi/2<alpha<=0 , but for what is supposed to be other angles I get the wrong readings. I suspect this has to do with gimbal lock and that I