Skip to main content
Version: 4.x

Camera controls modes

Reveal allows you to use different camera controls modes. You can set different controls modes using setCameraControlsOptions method of Cognite3DViewer class in runtime. Configurable parameters are described in CameraControlsOptions type (see API Reference for details).

Mouse wheel action

Property mouseWheelAction describes what happens when user initiate a mouse wheel scroll. Possible valuses are:

zoomToTargetzooms just to the current target (center of the screen) of the camera.
zoomPastCursorzooms in the direction of the ray coming from camera through cursor screen position, allows going through objects.
zoomToCursormouse wheel scroll zooms towards the point on the model where cursor is hovering over, doesn't allow going through objects.

Default value is zoomPastCursor.

On click camera target change

Property changeCameraTargetOnClick enables or disables camera target change based on mouse clicks. When enabled, mouse click sets camera target to the point on the model where cursor is hovering over.

Default value is false.

Example of setting different camera controls options:

Live Editor