Skip to content

Instantly share code, notes, and snippets.

@ChrisFlannagan
Created August 26, 2017 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisFlannagan/29b3773b92b423890432a85032d87cb8 to your computer and use it in GitHub Desktop.
Save ChrisFlannagan/29b3773b92b423890432a85032d87cb8 to your computer and use it in GitHub Desktop.
var geometry:SCNGeometry
geometry = SCNTorus(ringRadius: 0.5, pipeRadius: 0.1)
geometry.materials.first?.diffuse.contents = UIColor.blue
ring = SCNNode(geometry: geometry)
ring.physicsBody = SCNPhysicsBody(type: .dynamic, shape: nil)
ring.physicsBody?.mass = 5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment