瀏覽代碼

add updateUpVectorFromRotation to children of xrCamera

Trevor Baron 6 年之前
父節點
當前提交
962926553f
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 1 0
      src/Cameras/XR/babylon.webXRCamera.ts
  2. 5 0
      tests/validation/config.json

+ 1 - 0
src/Cameras/XR/babylon.webXRCamera.ts

@@ -28,6 +28,7 @@ module BABYLON {
                 newCamera.minZ = 0;
                 newCamera.parent = this;
                 newCamera.rotationQuaternion = new BABYLON.Quaternion();
+                newCamera.updateUpVectorFromRotation = true;
                 this.rigCameras.push(newCamera);
             }
             while (this.rigCameras.length > viewCount) {

+ 5 - 0
tests/validation/config.json

@@ -2,6 +2,11 @@
   "root": "https://rawgit.com/BabylonJS/Website/master",
   "tests": [
     {
+      "title": "Camera rig",
+      "playgroundId": "#ATL1CS#9",
+      "referenceImage": "cameraRig.png"
+    },
+    {
       "title": "XR camera container rotation",
       "playgroundId": "#JV98QW#5",
       "referenceImage": "xrCameraContainerRotation.png",