Sudoku Posted November 9, 2018 Share Posted November 9, 2018 Hi together, i have some problems with the babylon GUI Image Observables for pointer events: if my viewport height is lower than 1 the pointerevents are not catched at the right position I will share two playgoundexamples: This works: https://www.babylonjs-playground.com/#K60448#28 This doesn't work: https://www.babylonjs-playground.com/#K60448#29 Did i forget to set an attribute? Quote Link to comment Share on other sites More sharing options...
Guest Posted November 10, 2018 Share Posted November 10, 2018 Good catch! Thanks a lot for reporting it. I'll fix it for next nightly Quote Link to comment Share on other sites More sharing options...
Sudoku Posted November 10, 2018 Author Share Posted November 10, 2018 Great, that was fast, thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted November 11, 2018 Share Posted November 11, 2018 I take it personaly when there is a bug DylanD 1 Quote Link to comment Share on other sites More sharing options...
Sudoku Posted November 12, 2018 Author Share Posted November 12, 2018 could you have a look at those two playground examples as well? the first example works fine while in the second example i added a second viewport and than the events are triggered slightly above the image. does works: https://www.babylonjs-playground.com/index.html#K60448#33 doesn't work: https://www.babylonjs-playground.com/index.html#K60448#32 Quote Link to comment Share on other sites More sharing options...
Guest Posted November 12, 2018 Share Posted November 12, 2018 This is not a bug per se. This is because you render the UI twice (once per camera) but the UI has only one state (so the latest camera wins). I would recommend making sure that UI is not rendered on the second camera by using layerMasks Quote Link to comment Share on other sites More sharing options...
Sudoku Posted November 12, 2018 Author Share Posted November 12, 2018 the missing hint - thank you! just in case someone has a similar setup: i need to render the GUI elements in every viewport, but i just need to change the order in which the cameras are stored within activeCameras depending on the pointerposition and than the interaction with the labels works as expected. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.