Reputation: 23
I am trying to develop a robotic arm tracking system. I used scenekit to develop the visualization and the control of the system. The SCNNodes of my system is:
Shoulder--->Upper_arm--->Fore_arm--->Palm.
I could now rotate each node using the rotation property of each SCNNode.
And I am now interested in whether there's any existing API to compute the angle between two SCNNode
when the system is moving, eg. the angle between the Upper_arm and Fore_arm?
Upvotes: 1
Views: 1679
Reputation: 768
Try SCNNode.eulerAngles
, you will get SCNVector3
, which has components:
Fore_arm.eulerAngles
will give you rotation angles relative to Upper_arm
Upvotes: 1