renjianfeng Posted May 29, 2018 Share Posted May 29, 2018 Hi, I have three button on the GUI interface, I mainly want to implement a game handle, a button says "fire", the other two buttons said "direction", now the problem is, when I press the two buttons at the same time, "onPointerDownObservable" event is executed correctly, but "onPointerUpObservable" event only carried out the last of the button, how to set up a web page or other parameters? thinks!!! Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted May 29, 2018 Author Share Posted May 29, 2018 I realized it at the playground As you can see, when you press two buttons at the same time and then release one, the up event of the other button is also executed. https://www.babylonjs-playground.com/#XCPP9Y#532 Quote Link to comment Share on other sites More sharing options...
trevordev Posted May 29, 2018 Share Posted May 29, 2018 I'm not sure I repro'd exactly what you are seeing but I did notice that touch both buttons at once and then releasing causes a right click event to be fired which might be interrupting your up/down events. I disabled right clicking on the canvas using $("#renderCanvas").bind("contextmenu", ()=>{ return false }) This stops the right click event and up/down events seem to work expected now for me here (tested with: Chrome + laptop with touchscreen): https://www.babylonjs-playground.com/#XCPP9Y#533 Let me know if this still doesn't fix your issue. renjianfeng 1 Quote Link to comment Share on other sites More sharing options...
renjianfeng Posted June 1, 2018 Author Share Posted June 1, 2018 On 5/30/2018 at 2:20 AM, trevordev said: I'm not sure I repro'd exactly what you are seeing but I did notice that touch both buttons at once and then releasing causes a right click event to be fired which might be interrupting your up/down events. I disabled right clicking on the canvas using $("#renderCanvas").bind("contextmenu", ()=>{ return false }) This stops the right click event and up/down events seem to work expected now for me here (tested with: Chrome + laptop with touchscreen): https://www.babylonjs-playground.com/#XCPP9Y#533 Let me know if this still doesn't fix your issue. Please ignore this stupid question of mine, because it works well in the latest version. Thank you for your advice. trevordev and GameMonetize 2 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.