# Camera fade issue?

**URL:** <https://phaser.discourse.group/t/camera-fade-issue/5051>\
**Category:** Phaser 3\
**Created:** [January 31, 2020, 9:11pm UTC](https://phaser.discourse.group/t/camera-fade-issue/5051 "2020-01-31T21:11:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thundros](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/thundros/32/2057_2.png) [@Thundros](https://phaser.discourse.group/u/Thundros)\
**Post date:** [January 31, 2020, 9:11pm UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/1 "2020-01-31T21:11:41Z")

</div>

so I’m trying to simply fade out my scene when the character goes beyond the map limits. Problem is, it fades to black then goes back to the scene for a second before resetting the scene.

Here’s the code I’m using :

```javascript
// `Fade` the Camera out with a 250 millisecond delay

cam.fade ( 250, 0, 0, 0, false, ( camera, progress ) => {
	if ( progress > 0.999 ) {
		this.__scene.restart();
	}
} );

cam.on ( Phaser.Cameras.Scene2D.Events.FADE_OUT_COMPLETE, ( ) => {
	this.__playerFallsInHole = false;
} );

```

Here’s a video of the issue :

[https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/d/dea881cfea68e252a5f6125051b63bd5b2e4c824.mp4](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/d/dea881cfea68e252a5f6125051b63bd5b2e4c824.mp4)

Any help as always is GREATLY appreciated!

Thanks!

---

<div class="post-metadata">

**Author:** ![Thundros](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/thundros/32/2057_2.png) [@Thundros](https://phaser.discourse.group/u/Thundros)\
**Post date:** [February 1, 2020, 4:25pm UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/2 "2020-02-01T16:25:53Z")

</div>

Someone can help?

---

<div class="post-metadata">

**Author:** ![Lupo](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/lupo/32/4808_2.png) [@Lupo](https://phaser.discourse.group/u/Lupo)\
**Post date:** [February 2, 2020, 1:30pm UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/3 "2020-02-02T13:30:48Z")

</div>

did you already try restarting the scene in the onComplete Event?

HTH

---

<div class="post-metadata">

**Author:** ![Thundros](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/thundros/32/2057_2.png) [@Thundros](https://phaser.discourse.group/u/Thundros)\
**Post date:** [February 2, 2020, 6:24pm UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/4 "2020-02-02T18:24:10Z")

</div>

How?

---

<div class="post-metadata">

**Author:** ![Thundros](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/thundros/32/2057_2.png) [@Thundros](https://phaser.discourse.group/u/Thundros)\
**Post date:** [February 4, 2020, 12:19am UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/5 "2020-02-04T00:19:41Z")

</div>

Hello?..

---

<div class="post-metadata">

**Author:** ![Thundros](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/thundros/32/2057_2.png) [@Thundros](https://phaser.discourse.group/u/Thundros)\
**Post date:** [February 7, 2020, 5:28pm UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/8 "2020-02-07T17:28:04Z")

</div>

hello? Tired of being ignored here… ☹

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [February 7, 2020, 6:51pm UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/9 "2020-02-07T18:51:24Z")

</div>

Try to figure out what your scene is doing during that time. Add breakpoints or console logs.

---

<div class="post-metadata">

**Author:** ![Lupo](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/lupo/32/4808_2.png) [@Lupo](https://phaser.discourse.group/u/Lupo)\
**Post date:** [April 13, 2020, 9:43am UTC](https://phaser.discourse.group/t/camera-fade-issue/5051/10 "2020-04-13T09:43:36Z")

</div>

sorry, was very busy lately and therefore didn’t visit the forum. Didn’t mean to ignore you.

you still working on that issue?

i meant:

```javascript
cam.on ( Phaser.Cameras.Scene2D.Events.FADE_OUT_COMPLETE, ( ) => {
this.__scene.restart();
	this.__playerFallsInHole = false;
} );

```
