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()`.

Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.