Skip to content

Commit

Permalink
Merge pull request #3675 from anne-gropler/flyTo_maxHeight_fix
Browse files Browse the repository at this point in the history
fix #3674
  • Loading branch information
bagnell committed Mar 8, 2016
2 parents 43e9d49 + c31d9d2 commit 54e64bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/Scene/CameraFlightPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ define([

function createHeightFunction(camera, destination, startHeight, endHeight, optionAltitude) {
var altitude = optionAltitude;
var maxHeight;
var maxHeight = Math.max(startHeight, endHeight);

if (!defined(optionAltitude)) {
var start = camera.position;
Expand All @@ -73,7 +73,6 @@ define([
var verticalDistance = Cartesian3.magnitude(Cartesian3.multiplyByScalar(up, Cartesian3.dot(diff, up), scratchCart2));
var horizontalDistance = Cartesian3.magnitude(Cartesian3.multiplyByScalar(right, Cartesian3.dot(diff, right), scratchCart2));

maxHeight = Math.max(startHeight, endHeight);
altitude = Math.min(getAltitude(frustum, verticalDistance, horizontalDistance) * 0.20, 1000000000.0);
}

Expand Down

0 comments on commit 54e64bb

Please sign in to comment.