Sign in to follow this  

How do you bring sprites/groups to front with Phaser 3?

Recommended Posts

Hey guys,

So I've just started refactoring my codebase to Phaser 3 today and I've hit a few bumps.

Nothing too bad so far, but one I can't get my head around is how to bring sprites/sprite groups to the front of the display in Phaser 3.

In Phaser 2 we had, but I'm struggling to find the equivalent in Phaser 3.

Any help appreciated, nice one thanks.



Share this post

Link to post
Share on other sites

I've been looking through the Phaser 3 repo and found that SceneManager has a "bringToTop" method, but this only takes a Scene as a parameter.
Has "bringToTop" in a sprite/group context been removed in Phaser 3? 
if so I'd like to request that it is reimplemented as I found this to be really useful in Phaser 2.

If it has been removed, can anyone suggest a temporary workaround to bring a sprite group to the top of a view? I'm assuming it'll involve manipulating the group's children's z-indexes but I'm not sure how this would be done relative to other groups in the Scene

Nice one thanks,


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.