|
@@ -13400,16 +13400,6 @@ var BABYLON;
|
|
|
BABYLON.Matrix.LookAtLHToRef(this.position, this._currentTarget, this.upVector, this._viewMatrix);
|
|
|
return this._viewMatrix;
|
|
|
};
|
|
|
- TargetCamera.prototype._getVRViewMatrix = function () {
|
|
|
- this._updateCameraRotationMatrix();
|
|
|
- BABYLON.Vector3.TransformCoordinatesToRef(this._referencePoint, this._cameraRotationMatrix, this._transformedReferencePoint);
|
|
|
- BABYLON.Vector3.TransformNormalToRef(this._defaultUpVector, this._cameraRotationMatrix, this._cameraRigParams.vrActualUp);
|
|
|
- // Computing target and final matrix
|
|
|
- this.position.addToRef(this._transformedReferencePoint, this._currentTarget);
|
|
|
- BABYLON.Matrix.LookAtLHToRef(this.position, this._currentTarget, this._cameraRigParams.vrActualUp, this._cameraRigParams.vrWorkMatrix);
|
|
|
- this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix, this._viewMatrix);
|
|
|
- return this._viewMatrix;
|
|
|
- };
|
|
|
/**
|
|
|
* @override
|
|
|
* Override Camera.createRigCamera
|
|
@@ -13422,8 +13412,6 @@ var BABYLON;
|
|
|
this.rotationQuaternion = new BABYLON.Quaternion();
|
|
|
}
|
|
|
rigCamera._cameraRigParams = {};
|
|
|
- rigCamera._cameraRigParams.vrActualUp = new BABYLON.Vector3(0, 0, 0);
|
|
|
- rigCamera._getViewMatrix = rigCamera._getVRViewMatrix;
|
|
|
rigCamera.rotationQuaternion = new BABYLON.Quaternion();
|
|
|
}
|
|
|
return rigCamera;
|
|
@@ -44742,6 +44730,7 @@ var BABYLON;
|
|
|
impostor.object.position.copyFrom(impostor.physicsBody.getPosition());
|
|
|
}
|
|
|
impostor.object.rotationQuaternion.copyFrom(impostor.physicsBody.getQuaternion());
|
|
|
+ impostor.object.rotationQuaternion.normalize();
|
|
|
}
|
|
|
};
|
|
|
OimoJSPlugin.prototype.setPhysicsBodyTransformation = function (impostor, newPosition, newRotation) {
|