UniversalCamera No longer rotates from touch?

Sorry I mean, is there anything we can change in our code to detect that and do it automatically you could PR as a fix ?

I met this problem too, so how can we solve this since updating from Babylon version4.0 to Babylon Version5.0.

@PolygonalSun could you have a look into it ?

1 Like

I can take a look at it. IIRC, there was an issue with determining if the touch events were coming from an emulated setup. I’ll have to figure out how to rework the logic.

2 Likes

@PolygonalSun is it a regression from 4.2 and is the solution to forcefully set the boolean ?

From what I’ve tested, this has been an issue since 4.2 but in the previous working version (4.1), touch didn’t work correctly either (Left or Right pans, Up or Down zooms). The touchEnabled flag is manually set to false in touchCamera.ts for the FreeCameraMouseInput object. By default, it’s true and I suspect that when touch rotation occurs, it’s only ever using the MouseInput code to do it.

1 Like

Fix for emulator and iOS is in PR: Fix FreeCameraTouchInput to work with Emulator and iOS, Add SingleTouchRotate flag by PolygonalSun · Pull Request #10664 · BabylonJS/Babylon.js (github.com)

1 Like

PR is merged

1 Like

Could you PLZ create a PG to show this? thanks

What do you want to see, the universalCamera should work by default ?

yes, but I solved it. Thanks

Hi, I know this is old, but I ran into same issue and this works for me very fine (Babylon.js v6.31.0).
On mobile, use touchAngularSensibility and not angularSensibility:

camera.touchAngularSensibility=10000

Behavior:
Swipe left: look left
Swipe right: look right
Swipe up: go forward (won’t look up)
Swipe down: go back (won’t look down)

2 Likes