I created a few buttons using BABYLON.GUI.Button.CreateSimpleButton method. The code working fine in desktop view but not in mobile view.
I use the following way to calculate the button size dynamically according to the current screen height. So that the button will be position nicely in the view.
Here is my webpage:
var numOfButton = 12;
buttonSize = canvas.clientHeight / numOfButton + “px”;
buttonSizeD = canvas.clientHeight / numOfButton;
Here is mobile view
Here is desktop view
And the picking working fine in desktop view but not working correctly in mobile view, for example in mobile device when you click B1, it actually clicking B2.
Please advice! Thanks!