I’m working on migrating an application that uses Babylon on a windows environment to a Linux one.
I have 2 different Linux setups both wayland based. The application runs well but some multitouch actions do not work.
Looking into the browser’s console I can see an error reporting that the maxTouchPoints has been exceeded. Then I realized that the
Navigator.maxTouchPoints = 0, even when the touch screen is connected.
This behavior remains the same after testing it with different Babylon versions and Chromium versions as well.
I run some tests using a Ubunto regular environment (no wayland) and the value of the
Navigator.maxTouchPoints is ok (=10)
I know that the
Navigator.maxTouchPoints comes from the WebAPIs, but I have no clue why the value is being wrongly reported.
I may have been messy explaining the problem but I am not a developer and I am not comfortable with most of those concepts. Please request as much information as you need to understand the problem.
Thanks in advance,
Welcome to the forum @ngmartins !!!
Unfortunately it seems, as you noticed, to be an issue within Chromium on this environment You could try creating an issue on their bug tracker as I am not sure of any workarounds unfortunately.
Wow, you were fast. Appreciate your help.
I am not sure about the problem being on the Chromium level since it works properly in some setups.
Actually, I decided to come to this forum because in one of my most recent tests I dropped the Wayland and used an Xserver-based browser.
In that specific test, I got the
Navigator.maxTouchPoints = 10 as expected but the multitouch action still didn’t work. That’s when I start considering the problem being on the Babylon side
Ohhhh yes in this case it is strange. Let me add our input GURU @PolygonalSun to the thread !!! Please bare with us as we have team events this week.
Hey @ngmartins, just out of curiosity, what version of Babylon.js are you using?
Hey @sebavan thanks for joining.
I’m currently using the version
I did one more test and the result confuses me even more:
From a regular Ubuntu I enabled the Wayland and launch my application using the Chrome
This time the multi-touch action works just fine BUT the
Navigator.maxTouchPoints = 0.
Just checking up on your situation @ngmartins is there anything we can do to help you further?
Just confirm that
Navigator.maxTouchPoints = 0 is not the problem.
But still didn’t manage to use a Linux-based OS running Wayland and get the multitouch action to work using Babylon libs.
I did some tests to remove our implementation from the equation. I used directly Babylon playground here.
Same result: I can’t “zoom in / out” using the 2 fingers “pinch-like” gesture.
I have absolutely no idea where to look now.
Some advice would be very appreciated.
Sorry, I am a bit confused
The example you provided is using the free camera, which doesn’t support pinch-to-zoom. The arc rotate camera does:
FreeCamera_MouseWheel | Babylon.js Playground (babylonjs.com)
Does this example work?
Just to confirm what @RaananW is saying, FreeCamera currently doesn’t support any pinch to zoom gestures (or any multi-touch gestures, I believe). You might be able to find what you’re looking for with the UniversalCamera though.
@RaananW was right. We were using
FreeCamera and that was definitely a problem.
We had already did some tests with
ArcRotateCamera and it kinda works but the usability is not good at all.
Please allow me some time to play around with the
UniversalCamera suggested by @PolygonalSun .
Thanks for the help,