0

I am attempting to move a SKEmitterNode to follow a bullet in my game to give it a trailing effect however, no matter which way I attempt to implement this, it doesn't seem to work how I want it to and I'm at a loss for how to make this.

I have attempted to add the emitter to my main scene and manually moved the node a few times per second but it ends up not leaving a trail and keeping all the particles in one place like this: enter image description here

Next I attempted to set the target node, however when I do this the trail goes for a bit then stops rather than following the bullet like it's supposed to. It also rotates and distorts from the rotation of the projectile like shown here: enter image description here

For reference of the type of effect I'm looking for: enter image description here

harrisondev
  • 127
  • 7

1 Answers1

3

You should populate the targetNode property of your emitter with a node that is not moving like the scene.

emitterNode.targetNode = self // where self is the current scene
Luca Angeletti
  • 58,465
  • 13
  • 121
  • 148
  • 1
    YES! This is what I needed! You just completely solved my problem and I've been working on this for hours. Thank you so much! – harrisondev Jan 28 '20 at 21:28