I am trying to make a follow camera in scenekit. I have just started, so try to bear with me. I have a node (robotNode
) and am trying to have the camera follow the robot. I have partially achived this by doing adding the camera as a child node of the robot:
cameraNode = [SCNNode node];
cameraNode.camera = [SCNCamera camera];
[robotNode addChildNode:cameraNode];
// place the camera
cameraNode.position = SCNVector3Make(0, 0, 10);
But the problem is when I start to rotate the camera, it doesn't follow the node anymore. See here:
How can I get it to continue to follow the node?