Jump to content

GUI and Minimap


Recommended Posts

Hi again,

I have recently run into a wall that I could use some help with. I am using an advancedTexture for a GUI. The problem is, that when I add a second camera to the scene as a minimap, the GUI no longer receives pointer events. Here is an example https://www.babylonjs-playground.com/#XCPP9Y#387  As you can see, the button doesn't work.

Obviously I need to get the buttons working again. If I remove the minimap, everything works as expected.

Any ideas?


Thank you


Link to comment
Share on other sites

Thanks brianzinn.

Your solution works so long as the button is not linked to a mesh. I didn't know there would be a difference, so didn't include that information in my original post. Sorry.

Now I just have to work out why area being displayed as the button is not the area that responds to the click.


In this playground, the area that responds to the clicks is above the sphere by the height of the sphere.

Edited by 2x4b
more information
Link to comment
Share on other sites

If I push the minimap first, as you did in the playground ( https://www.babylonjs-playground.com/#XCPP9Y#390 ), the minimap gets obscured by objects rendered in the second camera. I need the minimap on top, that is why I pushed it second.

I think it could be a bug, as the buttons graphical portion is displayed in the correct place. Surely the area responding to pointer input and the area used for displaying the button should match.

Thank you for your help brianzinn.

Link to comment
Share on other sites

Looks like the minimap getting obscured can't be worked around as the render order is purely the index in activeCameras array:

There's another new question about GUI pointer events off, so wonder if these are related.

Link to comment
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.


  • Recently Browsing   0 members

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