|
@@ -270,11 +270,11 @@ module BABYLON {
|
|
|
protected _updateCameraRotationMatrix() {
|
|
|
if (this.rotationQuaternion) {
|
|
|
this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix);
|
|
|
- //update the up vector!
|
|
|
- BABYLON.Vector3.TransformNormalToRef(this._defaultUpVector, this._cameraRotationMatrix, this.upVector);
|
|
|
} else {
|
|
|
Matrix.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this._cameraRotationMatrix);
|
|
|
}
|
|
|
+ //update the up vector!
|
|
|
+ BABYLON.Vector3.TransformNormalToRef(this._defaultUpVector, this._cameraRotationMatrix, this.upVector);
|
|
|
}
|
|
|
|
|
|
public _getViewMatrix(): Matrix {
|
|
@@ -287,6 +287,8 @@ module BABYLON {
|
|
|
// Computing target and final matrix
|
|
|
this.position.addToRef(this._transformedReferencePoint, this._currentTarget);
|
|
|
} else {
|
|
|
+ //update the up vector!
|
|
|
+ BABYLON.Vector3.TransformNormalToRef(this._defaultUpVector, this._cameraRotationMatrix, this.upVector);
|
|
|
this._currentTarget.copyFrom(this._getLockedTargetPosition());
|
|
|
}
|
|
|
|