瀏覽代碼

Rotation quaternion must be initialized

In case the user hasn't done it himself.
Raanan Weber 9 年之前
父節點
當前提交
bb7a5e875a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Cameras/VR/babylon.webVRCamera.ts

+ 2 - 0
src/Cameras/VR/babylon.webVRCamera.ts

@@ -16,6 +16,8 @@ module BABYLON {
             this.setCameraRigMode(Camera.RIG_MODE_VR, { vrCameraMetrics: metrics });
 
             this._getWebVRDevices = this._getWebVRDevices.bind(this);
+            
+            this.rotationQuaternion = new Quaternion();
         }
 
         private _getWebVRDevices(devices: Array<any>): void {