Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let tube = SCNCylinder(radius: 0.5, height: 2)
- tube.firstMaterial?.diffuse.contents = UIColor.white
- tube.firstMaterial?.transparency = 0.4
- let nodeTube = SCNNode(geometry: tube)
- nodeTube.position = SCNVector3(0, 0, -3)
- let particleSystem = SCNParticleSystem(named: "FloatingParticleSystem", inDirectory: nil)
- particleSystem?.emitterShape = tube
- particleSystem?.birthLocation = .volume
- nodeTube.addParticleSystem(particleSystem!)
- nodeTube.addChildNode(nodeTube)
- sceneView.scene.rootNode.addChildNode(nodeTube)
Add Comment
Please, Sign In to add comment