Hi all,
I am building a .NET Maui android app with CesiumJS.
Is it possible to have inertia with rotational panning and zooming via pinch?
Here are my current settings…
// Configure camera controller for smooth inertia on all devices
const controller = viewer.scene.screenSpaceCameraController;
// Enable all camera movements
controller.enableZoom = true;
controller.enableRotate = true;
controller.enableTranslate = true;
controller.enableTilt = true;
controller.enableLook = true;
controller.zoomFactor = 12.0;
// Set inertia values (0.0 = no inertia, 0.99 = maximum inertia)
controller.inertiaZoom = 0.82; // Pinch-to-zoom and wheel inertia
controller.inertiaSpin = 0.9; // Rotation
controller.inertiaTranslate = 0.9; // Panning
// Configure zoom event types
controller.zoomEventTypes = [
Cesium.CameraEventType.WHEEL,
Cesium.CameraEventType.PINCH
];
// Configure tilt events
controller.tiltEventTypes = [
Cesium.CameraEventType.MIDDLE_DRAG,
Cesium.CameraEventType.PINCH,
{
eventType: Cesium.CameraEventType.LEFT_DRAG,
modifier: Cesium.KeyboardEventModifier.CTRL
},
{
eventType: Cesium.CameraEventType.RIGHT_DRAG,
modifier: Cesium.KeyboardEventModifier.CTRL
}
];
// Set zoom limits
controller.minimumZoomDistance = 1.0;
controller.maximumZoomDistance = 40000000.0;
Thank you!