Jump to content

Phaser 3 HUD Menu


yigitozdemir
 Share

Recommended Posts

Hi everyone,

I am trying to move Phaser 3 and building a demo project that includes HUD menu.

In Phaser 2, i was using sprite.fixedToCamera but i couldn't find a property that equals to fixedToCamera in docs.

Is there a proper solution to implement HUD menus that won't be affected from main camera's zoom ratio?

Thank you!

Yiğit.

Link to comment
Share on other sites

With Phaser 3, you can create a HUD/UI overlay with a scene that is active at the same time as your main game scene (or scenes).  Every scene has its own set of inputs, game objects, cameras and more; so the camera setup in one scene is totally separate from every other scene.  You can start/restart/stop/pause and change the render order (the scene layering or depth) with the Scene Manager.

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...

Sorry to bump and old thread, this idea is working great for me but I have one problem.

Pretend that instead of a set text call like in the example it was a fillRect instead.  This still works fine until a user does something like resizes the window, then the fillrect starts painting all over the main scene.

How can you trigger a repaint of the main scene in case of a resize?

Link to comment
Share on other sites

  • 9 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...