Mouse events show up in the console but it doesn’t seem that’s it’s touch event. Not sure about that.
I’ve tried the PG on my device and I can zoom in/out but I can’t do it with Chrome emulation.
Is there an option to enable touch emulation?
Its also proven to not work on mobiles though not just emulation, only reason I figured it out is because clients were complaining that they could not rotate the camera on mobile.
hostInformation.isMobile is false when starting on a desktop webbrowser. It’s only updated when creating the Canvas. So, in order to get it to True, click the Run button to restart the playground and it should work.
And with that, I get the same behavior as on my device.
@sebavan, are you referring to making use of the eventPrefix value in the InputManager (which is propagated by Tools.GetPointerPrefix(engine))? If so, I’m not sure that would work for the this scenario.
In any case, lemme take a look at the code and see what’s going on with the Universal Camera
So here’s what I found. The reason that the UniversalCamera is failing to rotate when in emulation is because of a set boolean in the TouchCamera (which is inherited by UniversalCamera).
Because the path of inheritance looks like this:
Camera -> TargetCamera -> FreeCamera (default for PG) -> TouchCamera -> UniversalCamera
And the affected change is in the TouchCamera, this should explain why it works in the default PG but not when the camera is changed to UniversalCamera.
The fix for this would either be to remove the mouse.touchEnabled = false line from TouchCamera
Or add a flag to line 73 of freeCameraMouseInput.ts that accounts for emulators: