Closed IhorKram closed 2 years ago
I've found the solution. Instead of
-cameraNode.eulerAngles.y
use rotation:
let v1 = SCNVector3(0, 0, 1)
let v2 = cameraNode.presentation.convertPosition(v1, to: nil)
let rotation = atan2(v2.z, v2.x) - (.pi / 2)
Had the same problem. Good fix. This fix should be merged into the latest version.
to rotate compass we use eulerAngles:
-cameraNode.eulerAngles.y
But it works not in a proper way. The compass always jumps in different directions during rotation.