iosswiftsprite-kitparticlesskemitternode

Have my particles let trail of there movement on the scene in SpriteKit even in a child node


I want the same effect than in this project

But my particles SKEmitterNode isn't directly in the Scene, but in a child node. My particles are reactor effect behind my spaceship, and I want it to leave a trail on the scene as the SpaceShip node moves.

Right now my particles are a child node of my SpaceShip and so, "all" particles move with the SpaceShip so it display just a point and doesn't leave a trail.

How can I do it ?


Solution

  • You need to set the targetNode on your emitter to be your SKScene.