David Catuhe 9 年之前
父節點
當前提交
a7cd75dc83

File diff suppressed because it is too large
+ 22 - 22
dist/preview release/babylon.core.js


File diff suppressed because it is too large
+ 1498 - 1499
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 27 - 27
dist/preview release/babylon.js


+ 1 - 12
dist/preview release/babylon.max.js

@@ -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) {

File diff suppressed because it is too large
+ 27 - 27
dist/preview release/babylon.noworker.js


+ 0 - 12
src/Cameras/babylon.targetCamera.js

@@ -188,16 +188,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
@@ -210,8 +200,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;

+ 1 - 0
src/Physics/Plugins/babylon.oimoJSPlugin.js

@@ -258,6 +258,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) {