Created
June 1, 2020 08:53
-
-
Save factoryhr/cc25c5180b5f902625d1d516bc031176 to your computer and use it in GitHub Desktop.
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
func createPhysicsBody(for node: SCNNode){ | |
let boxGeomtery = SCNBox(width: 0.2, height: 0.2, length: 0.2, chamferRadius: 0) | |
let physicsShape = SCNPhysicsShape(geometry: boxGeomtery, options: nil) | |
let physicsBody = SCNPhysicsBody(type: .kinematic, shape: physicsShape) | |
node.physicsBody = physicsBody | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment