"z-index" of sprite and new scene

Hello. I have a problem, when i try to drag a sprite over imported scene. May be some one have the same problem and can help, pls.

1 Like

What’s the problem? What are you trying to accomplish?

When i drag game sprite over new scene, this sprite hiding under new scene.

So it sounds like you’ve implemented some kind of dragging and dropping feature. It also sounds like you have multiple scenes running in parallel.

The first potential issue I can think of is that sprites cannot move between scenes without destroying them in the first scene and recreating them in the second.

But if you’re doing that already, then you may just want to look into setting the depth of your sprite. https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Sprite.html#depth__anchor

Thank you. I solved this problem. I just moved all the functionality to the parent scene.