Jump to content

Scene restarting not resetting camera FX


Recommended Posts

I was wondering if it's expected behavior that camera effects are not reset when a scene is restarted.

The following code will fade out, and the screen will remain black after the scene is restarted:

gameScene.create = function() {

  // create a sprite
  let bg = this.add.sprite(100, 100, 'treasure');

  // fade out

  // restart the scene
  this.time.delayedCall(2000, function() {
  }, [], this);


What I'm adding at the moment is `this.cameras.main.resetFX();` when initiating a scene in order to have the view back, but it kind of feels like the camera subsystem should refresh as well when using `this.scene.restart()`.

Link to comment
Share on other sites

I also noticed this and I think some detailed clarity on what should be retained when a scene is restarted or a new one started is necessary. This currently works counter to the way I think it should, but just having some more understanding and clarity of what to expect when a scene starts would probably clear up a majority of my issues I'm considering opening up bugs for.

Link to comment
Share on other sites

  • 2 weeks later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...