scenario:
I am displaying polygon and image texture on him.
I fixture the camera to a place that I can view the polygon image on the map.
How can I zoom IN/OUT or move all over the image without moving the camera position from his place?
Zooming in in CesiumJS is moving the camera forward, so I don’t think you can do that without moving the camera.
But you can change the direction by setting camera.direction to a new vector while keeping it in place. This camera Sandcastle is a nice reference of what all you can do:
Unfortunately, Cesium and other apps misuse the term zoom when what they are doing is called a dolly. A zoom lens changes the field of view. See this and this for more information.
thank you for your Response,
I get over that by this way:
For zoom IN/Out without moving the view:
I disabled the default zoom, listen to zoom wheel and increase/decrease the camera fov for getting the same affect of zoom.
viewer.scene.screenSpaceCameraController.enableZoom = false;
handler.setInputAction( (zoomScalar) => {
zoomScalar = zoomScalar / 250;
changedFov -= zoomScalar;
console.log( this.changedFov);
viewer.scene.camera.frustum.fov = Cesium.Math.toRadians( this.changedFov);
}, Cesium.ScreenSpaceEventType.WHEEL);
for moving whitout move the camera origin i disabeld the moving by dragigng
by:
viewer.scene.screenSpaceCameraController.enableRotation = false;
viewer.scene.screenSpaceCameraController.enableTranslate = false;
viewer.scene.screenSpaceCameraController.enableTilt = false;
and create dragigng by the listeners LEFT_DOWN and MOUSE_MOVE
and change the the end position the oreantation with the function :
viewer.camera.lookRight(delta.x);
viewer.camera.lookDown(delta.y);