问题
- (void)session:(ARSession *)session didUpdateFrame:(ARFrame *)frame {
SCNNode *shipNode = self.sceneView.scene.rootNode.childNodes[0];
if (shipNode) {
shipNode.eulerAngles = SCNVector3FromFloat3(frame.camera.eulerAngles);
}
}
I want to change ship's orientation with camera's moving, but the above code seems useless.
回答1:
Use an SCNBillboardConstraint to keep one node pointed toward another node.
来源:https://stackoverflow.com/questions/44921072/how-to-make-scnnode-is-always-toward-to-arframe-camera