I was just curious, is there a way to slowdown particle emitting along the other objects in the scene. Say you have one particle emitter, and one sprite. Sprite is moved using SKAction
. An emitter is emitting. Both nodes are added to the scene. If you set self.speed
to 0.5, only the sprite will slow down. Emitters will continue emitting at the same speed.
Is there a way to slowdown in some other way than using particleSpeed property, because that will change the behaviour of an emitter.
My question is inspired by this question: https://stackoverflow.com/a/41764180/3402095
Normally a
SKEmitterNode
have many properties involved in it's speed (xAcceleration
,yAcceleration
,particleSpeedRange
,particleScaleSpeed
..):So to achieve your request I think it should be possible to set the
targetNode
:You can find more details to the Apple official docs.
Some code to example:
In this example you can see how the speed applied to
myNode
involved the speed ofmyEmitter
everytime I touch the screen, because the emitter have thetargetNode
property setted withmyNode
, and I've also change theparticleSpeed
to seems a more realistic slowdown/accelleration.