Zuzuk Posted August 14, 2017 Share Posted August 14, 2017 Hi There is bug when BABYLON.GUI buttons that has been created with custom viewport on camera: buttons can be clicked even if mouse is out of button playground: https://www.babylonjs-playground.com/#08PH4F#1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 14, 2017 Share Posted August 14, 2017 Thanks for reporting it! Tracked here:https://github.com/BabylonJS/Babylon.js/issues/2662 (Will be fix in a couple of minutes ;)) Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 15, 2017 Author Share Posted August 15, 2017 One bug is fixed There is one more(or this is the same bug) Try to click on the left side of button and right side of screen: https://www.babylonjs-playground.com/#08PH4F#2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 15, 2017 Share Posted August 15, 2017 Should be good now Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 16, 2017 Author Share Posted August 16, 2017 Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 16, 2017 Author Share Posted August 16, 2017 I've updated babylon.max.js and babylon.gui.js Now buttons are not clickable Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 16, 2017 Share Posted August 16, 2017 It works on the playground so i would suspect a version issue ? Can you make sure you took the one from preview version that I dropped this morning? Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 17, 2017 Author Share Posted August 17, 2017 I've took libs from here: https://github.com/BabylonJS/Babylon.js/blob/master/dist/preview release/babylon.max.js https://github.com/BabylonJS/Babylon.js/blob/master/dist/preview release/gui/babylon.gui.js Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 17, 2017 Share Posted August 17, 2017 So it should work as they are the same as the playground Can you share a webpage reproducing the issue? Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 18, 2017 Author Share Posted August 18, 2017 <link deleted> click on the cube on the left side, then click on wall, then click on the button with "camera" on it Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 18, 2017 Share Posted August 18, 2017 I guess this is different. I guess you have multiple cameras with viewport? By default the activecamera is used for picking and it should be the first one in your scene. If you want to support picking on all scene, I will recommend creating a new camera, set it to scene.cameraToUseForPointers Even better: just create a second scene for you UI and set scene.autoClear = false. This will avoid all these issues Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 19, 2017 Author Share Posted August 19, 2017 19 hours ago, Deltakosh said: I guess this is different. I guess you have multiple cameras with viewport? By default the activecamera is used for picking and it should be the first one in your scene. If you want to support picking on all scene, I will recommend creating a new camera, set it to scene.cameraToUseForPointers Even better: just create a second scene for you UI and set scene.autoClear = false. This will avoid all these issues buttons are on the first camera viewport on the stable version of gui buttons works Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 21, 2017 Share Posted August 21, 2017 can you repro on the PG then? Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 22, 2017 Author Share Posted August 22, 2017 11 hours ago, Deltakosh said: can you repro on the PG then? https://www.babylonjs-playground.com/#HZJI5Z#1 Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 22, 2017 Author Share Posted August 22, 2017 Main camera needs to be set to scene.cameraToUseForPointers You were right but no new camera needs to be created(for second viewport I use argument "camera" in scene.pick function) Thanks Quote Link to comment Share on other sites More sharing options...
Zuzuk Posted August 22, 2017 Author Share Posted August 22, 2017 It fixed the PG, but not project and I found mistake: My fps text block was on top of ALL of screen, so it blocks all picks(I thought that text block is only where the text is) Thanks for fix, don't know why it works before Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 22, 2017 Share Posted August 22, 2017 lol this is perfect then 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.