vtk.js interactorStyleManipulator constrain rotation

Hi,

I’m using a vtkRenderWindowInteractor with the vtkInteractorStyleManipulator style applied to it. This allows to rotate the 3D view using mouse gestures.

I was wandering if there is a way to constrain the 3D rotation of the interactor in such a way that the horizon of the camera stays horizontal. In other words, dragging the mouse should allow for yawing and pitching but not rolling (there is a separate shortcut for that). Some pictures to illustrate:

Thanks a lot for the help!

I think this is what you are looking for.

1 Like

This is exactly what I was looking for indeed. Thanks a lot.