Browse Source

fix oculus touch controller offset

Trevor Baron 6 years ago
parent
commit
910f6a5269
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/Cameras/XR/webXRControllerModelLoader.ts

+ 2 - 0
src/Cameras/XR/webXRControllerModelLoader.ts

@@ -20,6 +20,8 @@ export class WebXRControllerModelLoader {
                 controllerModel.initControllerMesh(c.grip!.getScene(), (m) => {
                     controllerModel.mesh!.parent = c.grip!;
                     controllerModel.mesh!.rotationQuaternion = Quaternion.FromEulerAngles(0, Math.PI, 0);
+                    controllerModel.mesh!.position.y = 0.034;
+                    controllerModel.mesh!.position.z = 0.052;
                 });
             }else if (c.inputSource.gamepad && c.inputSource.gamepad.id === "oculus-quest") {
                 OculusTouchController._IsQuest = true;