pickWorldPosition
A callback function used to pick the world position around which to tilt or orbit. The function is called with Scene, the Cartesian2 screen space position, and a Cartesian3 instance to store the result. The function should return the Cartesian3 world position from which to tilt or orbit, or undefined if no position could be picked.
const tiltOrbitCameraController = new ScreenSpaceTiltOrbitCameraController();
tiltOrbitCameraController.pickWorldPosition = function (scene, windowPosition, result) {
// Pick the world position from the depth buffer
return scene.pickPosition(windowPosition, result);
};
viewer.addController(tiltOrbitCameraController);Content copied to clipboard