Преглед изворни кода

no need to center, just rotate

Raanan Weber пре 5 година
родитељ
комит
502a984755
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      src/Cameras/XR/motionController/webXRProfiledMotionController.ts

+ 4 - 4
src/Cameras/XR/motionController/webXRProfiledMotionController.ts

@@ -108,12 +108,12 @@ export class WebXRProfiledMotionController extends WebXRAbstractMotionController
         });
 
         console.log(min, max, { x: max.x + min.x, y: max.y + min.y, z: max.z + min.z });*/
-        const center = Mesh.Center(this.rootMesh.getChildMeshes());
-        this.rootMesh.position.subtractInPlace(center.scaleInPlace(2));
-        this.rootMesh.position.z *= -1;
+        // const center = Mesh.Center(this.rootMesh.getChildMeshes());
+        // this.rootMesh.position.subtractInPlace(center.scaleInPlace(2));
+        // this.rootMesh.position.z *= -1;
 
         this.rootMesh.rotate(Axis.Y, Math.PI, Space.WORLD);
-        this.rootMesh.rotate(Axis.X, -Math.PI / 4, Space.WORLD);
+        // this.rootMesh.rotate(Axis.X, -Math.PI / 4, Space.WORLD);
     }
     protected _updateModel(_xrFrame: XRFrame): void {
         if (this.disableAnimation) {