SciChart Android 3D Charts API > ChartModifier 3D API > Zooming and Panning > Free Look Modifier 3D
Free Look Modifier 3D

Zooming and Panning a Chart in SciChart3D is achieved by moving the SciChart3DSurface.Camera to a new location.

The article "The SciChart3DSurface Camera" goes into detail how this camera class works and how to manipulate it programatically to achieve various views.

If you want to add simple mvement of the camera (imagine free-look in a computer game) then you can do so using our ChartModifiers API. The FreelookModifier3D moves camera in the Left/Right/Up/Down direciton giving the appearance of rotation camera in the 3D World

Declaring an FreelookModifier3D

Declaring an FreelookModifier3D is as simple as adding one to the SciChart3DSurface.ChartModifiers property. This can be done as a single modifier, or as part of a ModifierGroup3D.

The following code will allow to rotate camera by scrolling with two fingers:

Declaring Modifier
Copy Code
final FreeLookModifier3D freeLookModifier3D = new FreeLookModifier3D();
freeLookModifier3D.setIsEnabled(true);
freeLookModifier3D.setDegreesPerPixelSensitivity(0.2f);
freeLookModifier3D.setExecuteOnPointerCount(2);
freeLookModifier3D.setReceiveHandledEvents(true);
surface3d.getChartModifiers().add(new ModifierGroup3D(freeLookModifier3D));