How to disable the camera rotation input?

HI,

here is the code to define a new camera.

var camera = new BABYLON.ArcRotateCamera(“Camera”, -Math.PI / 2, 0, 500, BABYLON.Vector3.Zero(), scene);

I would like to know how to disable the camera rotation input but preserve the panning input. Because I don’t allow user to rotate the scene. Thanks!

hi
the simple way is set correct rotation in each frame
https://playground.babylonjs.com/#55XXJ3

3 Likes

Alternative is https://doc.babylonjs.com/How_To/Customizing_Camera_Inputs

3 Likes

Thanks! Work like a charm!