I am trying to rotate SCNNode
with UIRotationGestureRecognizer
and changing of eulerAngles
. I switch between rotation around y
and around z
axis. When I rotate only one of them everything is fine. But problem appears when I rotate both. It no longer rotate around axis itself but it rotates randomly.
I have read many answers especially from ARGeo like this one: SCNNode Z-rotation axis stays constant, while X and Y axes change when node is rotated , and I understand problem of eulerAngles
and gimbal lock.
But I don't understand how to correctly use orientation
ant that w
component. Is here someone who successfully used UIRotationGestureRecognizer
and orientation
instead of eulerAngles
?