Created
March 14, 2021 04:21
-
-
Save tikimcfee/aba19ab6d9843ae41f9fa8fbd9191251 to your computer and use it in GitHub Desktop.
Found on the net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let distanceConstraint = SCNDistanceConstraint(target: box) | |
distanceConstraint.minimumDistance = 55 | |
distanceConstraint.maximumDistance = 60 | |
let lookAtConstraint = SCNLookAtConstraint(target: box) | |
lookAtConstraint.isGimbalLockEnabled = true | |
cameraNode.constraints = [lookAtConstraint,distanceConstraint] | |
scnView.scene?.rootNode.addChildNode(cameraNode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment