|
@@ -42,7 +42,7 @@ var BABYLON;
|
|
|
this._keys = [];
|
|
|
this._viewMatrix = new BABYLON.Matrix();
|
|
|
// Panning
|
|
|
- this.panningAxis = new BABYLON.Vector3(1, 0, 1);
|
|
|
+ this.panningAxis = new BABYLON.Vector3(1, 1, 0);
|
|
|
this._isRightClick = false;
|
|
|
this._isCtrlPushed = false;
|
|
|
this.checkCollisions = false;
|
|
@@ -405,9 +405,13 @@ var BABYLON;
|
|
|
if (Math.abs(this.inertialPanningY) < BABYLON.Engine.Epsilon)
|
|
|
this.inertialPanningY = 0;
|
|
|
this._localDirection.copyFromFloats(this.inertialPanningX, this.inertialPanningY, this.inertialPanningY);
|
|
|
+ this._localDirection.multiplyInPlace(this.panningAxis);
|
|
|
this._viewMatrix.invertToRef(this._cameraTransformMatrix);
|
|
|
BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection);
|
|
|
- this._transformedDirection.multiplyInPlace(this.panningAxis);
|
|
|
+ //Eliminate y if map panning is enabled (panningAxis == 1,0,1)
|
|
|
+ if (!this.panningAxis.y) {
|
|
|
+ this._transformedDirection.y = 0;
|
|
|
+ }
|
|
|
this.target.addInPlace(this._transformedDirection);
|
|
|
}
|
|
|
// Limits
|