Skip to content

Commit

Permalink
fix pickGlobe condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangheng committed Feb 21, 2023
1 parent 3f262e2 commit bc1de11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/engine/Source/Scene/ScreenSpaceCameraController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2189,12 +2189,12 @@ function zoom3D(controller, startPosition, movement) {
zoom3DCartographic
).height;

const inertiaMovementApproachingGround = height < 5;
const inertiaMovementApproachingGround = Math.abs(height) < 50;

if (
height < controller._minimumPickingTerrainHeight ||
(inertiaMovement && height < inertiaMovementApproachingGround)
) {
const needPickGlobe = inertiaMovement
? inertiaMovementApproachingGround
: height < controller._minimumPickingTerrainHeight;
if (needPickGlobe) {
intersection = pickGlobe(controller, windowPosition, zoomCVIntersection);
}

Expand Down

0 comments on commit bc1de11

Please sign in to comment.