|
@@ -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;
|
|
@@ -408,6 +408,10 @@ var BABYLON;
|
|
|
this._localDirection.multiplyInPlace(this.panningAxis);
|
|
|
this._viewMatrix.invertToRef(this._cameraTransformMatrix);
|
|
|
BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection);
|
|
|
+ //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
|