enable_joystick_style

Plotter.enable_joystick_style()

Set the interactive style to Joystick Camera.

It allows the user to move (rotate, pan, etc.) the camera, the point of view for the scene. The position of the mouse relative to the center of the scene determines the speed at which the camera moves, so the camera continues to move even if the mouse if not moving.

For a 3-button mouse, the left button is for rotation, the right button for zooming, the middle button for panning, and ctrl + left button for spinning. (With fewer mouse buttons, ctrl + shift + left button is for zooming, and shift + left button is for panning.)

Examples

Create a simple scene with a plotter that has the Joystick Camera interactive style:

>>> import pyvista as pv
>>> plotter = pv.Plotter()
>>> _ = plotter.add_mesh(pv.Cube(center=(1, 0, 0)))
>>> _ = plotter.add_mesh(pv.Cube(center=(0, 1, 0)))
>>> plotter.show_axes()
>>> plotter.enable_joystick_style()
>>> plotter.show()