In my SK Game I have rockets that fire and each one gets an SKEmitterNode
that creates a smoke trail effect. Once the rocket hits something I call removeFromParent
and this also removes the emitter which instantly removes the smoke trail. I want the smoke trail to stick around until the particles dissipate.
What I don't understand is why this doesn't happen even though the targetNode
is set to self.scene
. I have taken the emitter node, created an array with all of it's children
and called count
to NSLog
how many children it has and gotten back.. zero. It seems as if all of the particles should be children of the scene itself, so when the emitter is removed from the scene, it's particles shouldn't be, because they aren't it's children.
I have tried many, many different ways of doing this and none of them have worked.
All I want is for each rocket to have an emitter, which leaves a smoke trail, and when the rocket is destroyed, the smoke trail remains as it dissipates. But I can't call removeFromParent
on the rocket without destroying it's emitter too!