Switching scene with bringToTop - retains hand cursor

Hi, I am just starting my journey with Phaser so I might be missing some simple step but I stumbled upon such problem. I have 2 scenes added to GameConfig. When user click on gameObject which have handCursor active with

.setInteractive({useHandCursor: true})

I want to show 2nd scene on top of the first one with with

this.scene.bringToTop('gameWon`)

Scene is displayed correctly but the cursor is still “hand” instead of normal pointer. This does not happend if I try to open scene when cursor is not over any object. I tried to disable that object before opening 2nd scene with

disableInteractive()

but it didn’t help. 2nd scen have only one Text game object which is not interactive. How could I make sure that after opening new scene I will see default cursor?

I am using Phaser version 3.22.0

Edit:
If in 2nd scene I hover over interactive game object and then move it away cursor works correctly and switch do default one.

Moving a scene below another doesn’t prevent it and its game objects from receiving input (or changing the cursor). For that you could pause the scene, sleep the scene, or disable its input plugin.

I’m surprised that disableInteractive() isn’t removing the hand cursor though.

1 Like

Thanks a lot for that response I had an incorrect understanding off scenes. sleep() and wake() were exactly what I was needing.

I tried to create stackblitz to show this error but it turned out this wasn’t related to switching scenes but something else in my code(I have changed my original code and now I can’t tell what was exactly wrong)

1 Like