So I did some digging and figured it out. You add a particle emitter file, make it how you want, then add this code to your
"override func didMove(to view: SKView)" function. Don't forget to put in your own player (or whatever node you want to attach the particle to), and your own file name in place of "file"!
let emitter = SKEmitterNode(fileNamed: "file.sks")
emitter?.targetNode = self
emitter?.position = CGPoint(x: -70, y: -10)
emitter?.particleSize = CGSize(width: 35, height: 35)
player.addChild(emitter!)
"emitter?.targetNode = self" is what makes the particles stay in the same spot instead of following the node!
Topic:
Graphics & Games
SubTopic:
SpriteKit
Tags: