9

Whenever my SKEmitterNode is paused/unpaused (like when the app is backgrounded/foregrounded), there is an unnatural gap in the particles. All of the particles that should have been moving while paused seem to get stacked up and released when it's unpaused.

I have an example project that shows exactly what is happening, and here is a gif of it.

emitter pause gif

Edit:

This is a bug in iOS9 and tvOS, and a bug report has been filed with Apple. Thanks @WangYudong and @Ben-Kane for your help.

mikedave
  • 340
  • 2
  • 7
  • 1
    It may be a bug on iOS 9. At least, we can pause `SKEmitterNode` on iOS 8: http://stackoverflow.com/questions/32750415/unable-to-pause-skemitternode-in-ios9 – WangYudong Oct 12 '15 at 01:12
  • Yea pretty sure that's a bug in iOS 9, unfortunately. I've seen that exact same behavior. – Ben Kane Oct 12 '15 at 01:25
  • 1
    And know the question @WangYudong is referring to :) So yea, must be a bug. File a bug report! – Ben Kane Oct 12 '15 at 01:25
  • 1
    Oh, that is a bummer. I just downloaded the iOS8 simulators and confirmed that this is only happening in iOS9. Thanks for the help. I should have tried that first. – mikedave Oct 12 '15 at 01:31

1 Answers1

0

I also pause scenes with emitters and don't see this issue.

In my implementation I use this, hope it helps. I think setting the speed to 0 is the key as well as pausing?

func pauseGame(){
    if gamePaused == false {
        currentScene.speed = 0
        currentScene.paused = true
        gamePaused = true}
    else if globalVariables.gamePaused == true {
        currentScene.speed = Variables.gameSpeed
        currentScene.paused = false
        gamePaused = false
    } }
  • It still works for me as described in this question. But I am testing on 9.1. It could be that it's been fixed in 9.3. What iOS do you use ? After unpausing, does particles continue their movement exactly from where they left of (before the scene is paused) ? – Whirlwind Apr 01 '16 at 19:12
  • Can you by any chance record what you are seeing (like from the question above) ? You can use GifGrabber for that. – Whirlwind Apr 01 '16 at 19:14
  • Greetings, I am on 9.3. I'll grab some images shortly. – Undead-Earth .com Apr 01 '16 at 22:28
  • I downloaded the app but it appears to be recording in 8 or 16 bit color, but my emitters do work, I grabbed some poor quality images, but not sure how to embed here? – Undead-Earth .com Apr 01 '16 at 23:48
  • Well you should edit your answer and there should be an Image icon, right next to the Code Block icon...But unfortunately it may happen that you don't have enough rep to post images currently... – Whirlwind Apr 01 '16 at 23:55
  • My apologies, that does appear to be the issue. I only have 2 Rep points. – Undead-Earth .com Apr 02 '16 at 12:57