jacobf Posted December 27, 2018 Share Posted December 27, 2018 Hi, I'm looking for a way to block events coming to onPointerObservable() when the pointer is interacting with GUI elements. Is there a way to do a hit test for POINTERDOWN or something simpler than adding an on onPointerEnter/onPointerOut to every GUI control? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 28, 2018 Share Posted December 28, 2018 Hi there. https://www.babylonjs-playground.com/#1I4Y2F#1 Just a (badly-acting) testing playground, if needed. Can I ask WHY you want to block enter/out/down/up events... on any GUI controls? Are you trying to make picks/clicks...sometimes "get through" to mesh/nodes behind the GUI? Just curious. 14 hours ago, jacobf said: something simpler than adding an on onPointerEnter/onPointerOut to every GUI control? I assume you mean.. adding enter/out events to GUI rectangles that you wish to use as custom buttons. (creating rectangles that ACT like buttons) *nod* Generally speaking, there is likely a way to do what you wish, without needing to make custom buttons, OR block standard events on simpleButtons. Tell us some more details, if you please. Build us a better playground... teach us what you wish to do. We might be able to solve your issue with some .isForeground, .isBlocking, and/or .isPickable flags. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 31, 2018 Share Posted December 31, 2018 This thread has been moved to https://forum.babylonjs.com/t/best-way-to-make-gui-block-onpointerobservable/465 I am marking this as 'moved'... see ya at the new forum. 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.