fariazz Posted April 14, 2018 Share Posted April 14, 2018 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 this.cameras.main.fade(1000); // restart the scene this.time.delayedCall(2000, function() { this.scene.restart(); }, [], 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 More sharing options...
samme Posted April 14, 2018 Share Posted April 14, 2018 I'd noticed that too. It's possible it is intended, to allow you to fade in/out between scenes. fariazz 1 Link to comment Share on other sites More sharing options...
bobonthenet Posted April 15, 2018 Share Posted April 15, 2018 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. fariazz 1 Link to comment Share on other sites More sharing options...
fariazz Posted April 16, 2018 Author Share Posted April 16, 2018 On 4/14/2018 at 5:51 PM, samme said: I'd noticed that too. It's possible it is intended, to allow you to fade in/out between scenes. Oh that makes sense! Link to comment Share on other sites More sharing options...
rich Posted April 26, 2018 Share Posted April 26, 2018 Camera FX are reset when a Scene stops as of 3.5.0 Link to comment Share on other sites More sharing options...
Recommended Posts