diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 8ea672b..db4e501 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -396,12 +396,12 @@ export class CesiumGlobe { handler.setInputAction((movement) => { if (!this._lookState) return; const s = this._lookState; - const dx = movement.position.x - s.lastX; - const dy = movement.position.y - s.lastY; - s.lastX = movement.position.x; - s.lastY = movement.position.y; + const dx = movement.endPosition.x - s.lastX; + const dy = movement.endPosition.y - s.lastY; + s.lastX = movement.endPosition.x; + s.lastY = movement.endPosition.y; this._orbitAroundPivot(s.pivot, dx * LOOK_RATE, dy * LOOK_RATE); - }, Cesium.ScreenSpaceEventType.RIGHT_DRAG); + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); handler.setInputAction(() => { if (!this._lookState) return;