How to make the Touch rotation on the Y axis of UniversalCamera consistent in different coordinate system?

For FreeCamera, the Y-rotation behavior is consistent, regardless of the coordinate system used and whether it is a Touch rotate. for UniversalCamera, when using left-handed system , the Y-rotation behavior is consistent too, but when using right-handed system , the Touch rotation is opposite to the Mouse rotation on the Y axis. What needs to be done to make UniversalCamera’s rotation behavior consistent?
palyground

cc @PolygonalSun

Hey @jordia,

The reason why you’re seeing this inconsistency is because the FreeCamera uses, by default, FreeCameraMouseInput for both mouse and touch but the UniversalCamera adds FreeCameraTouchInput as part of its default controls. Unfortunately, FreeCameraTouchInput’s movement isn’t accounting for right-handedness so that’s why you’re seeing what you’re seeing. Anyway, here’s a PR for the fix: FreeCameraTouchInput: Add check for Handedness by PolygonalSun · Pull Request #14238 · BabylonJS/Babylon.js (github.com). This should be getting merged shortly.

3 Likes