Particles Left Over Switching Between Screens

I’m having an issue with particles being left over when switching from one screen to another. When I switch from page1 to page2, there are particles left over for a second on page2.

I’m using this function on page1 to remove the particles.

[lua]function clean ( event )
Particles.CleanUp()
end[/lua]

I found this forum post as was working with the function mentioned in that post:

http://developer.anscamobile.com/forum/2011/06/27/sampledirectorclass-bug

I’m working with the “Sample Director Class” example provided with Particle Candy.

How would you resolve this?

Demetrius [import]uid: 1380 topic_id: 12280 reply_id: 312280[/import]

We’d need to see your particle setup to give a detailed answer. In general, you should

  • First create a scene, then add your emitter
  • Before(!) a scene change, call CleanUp(), then change scene
  • Same procedure with the next scene

Are you using the same emitter in both scenes, for example? If so, you should stop the emitter before switching scenes, otherwise it will continue to emit particles in the new scene as well.

[import]uid: 10504 topic_id: 12280 reply_id: 44928[/import]