Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Allow to disable the suspendTerrainAdjustment behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
gberaudo committed Nov 24, 2017
1 parent 3228541 commit b66b853
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Scene/Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ define([
var scratchAdjustHeightTransform = new Matrix4();
var scratchAdjustHeightCartographic = new Cartographic();

Camera.enableSuspendTerrainAdjustment = true;
Camera.prototype._adjustHeightForTerrain = function() {
var scene = this._scene;

Expand All @@ -375,7 +376,7 @@ define([
var minimumCollisionTerrainHeight = screenSpaceCameraController.minimumCollisionTerrainHeight;
var minimumZoomDistance = screenSpaceCameraController.minimumZoomDistance;

if (this._suspendTerrainAdjustment || !enableCollisionDetection) {
if ((Camera.enableSuspendTerrainAdjustment && this._suspendTerrainAdjustment) || !enableCollisionDetection) {
return;
}

Expand Down

0 comments on commit b66b853

Please # to comment.