Skip to content

Instantly share code, notes, and snippets.

@factoryhr
Created June 1, 2020 08:53
Show Gist options
  • Save factoryhr/cc25c5180b5f902625d1d516bc031176 to your computer and use it in GitHub Desktop.
Save factoryhr/cc25c5180b5f902625d1d516bc031176 to your computer and use it in GitHub Desktop.
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