GUI does not work with Joystick! And alternative to joystick!

And yes. You have to take into account the position of pucks when you use those left and top properties on the container. I updated the code so you can easier do that.

https://www.babylonjs-playground.com/#C6V6UY#5

You can see a variables on lines 49 and 50. Which are controlling those left and top properties and updates the position of the pucks and containers symmetrically on both joysticks.

And if the screen size changes it works properly.

1 Like