Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Created October 14, 2018 01:55
Show Gist options
  • Save SunXiaoShan/8d17bd0db0f0b03c9c643faefd3f77bc to your computer and use it in GitHub Desktop.
Save SunXiaoShan/8d17bd0db0f0b03c9c643faefd3f77bc to your computer and use it in GitHub Desktop.
func renderer(_ renderer: SCNSceneRenderer, didUpdate node: SCNNode, for anchor: ARAnchor) {
guard let faceAnchor = anchor as? ARFaceAnchor, let faceGeometry = node.geometry as? ARSCNFaceGeometry else { return }
// 更新,臉部表情變化時的位置
faceGeometry.update(from: faceAnchor.geometry)
updateFeatures(for: node, using: faceAnchor)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment