DOCS

How to change the Camera controller type?

The camera controller type can either be:

  • none: the camera doesn't move.
  • editor: the camera moves in the 3D world editor.
  • orbit: the camera rotates around an orbit point.

https://docs.3dverse.com/sdk/SDK3DVerse.html#cameraControllerType

Start a session with a camera controller

1
2
3
4
5
6
7
8
await SDK3DVerse.startSession({
sessionConnectionInfo,
canvas: document.getElementById("display-canvas"),
viewportProperties: {
defaultControllerType: SDK3DVerse.controller_type.orbit,
},
maxDimension: 1920,
});

Set the camera controller type during a session

1
2
const viewport = SDK3DVerse.engineAPI.cameraAPI.getViewports()[0];
SDK3DVerse.engineAPI.cameraAPI.setControllerType(viewport.getId(), SDK3DVerse.cameraControllerType.editor);

Toggle camera controller type in Scene Editor

Previous
Use Livelink.js with React