Browse Source

MR-controller fix

Raanan Weber 5 years ago
parent
commit
fc5ebd4b6c

+ 3 - 10
src/Cameras/XR/motionController/webXRMicrosoftMixedRealityController.ts

@@ -20,8 +20,7 @@ const MixedRealityProfile: IMotionControllerLayoutMap = {
             "xr-standard-trigger": { "type": "trigger" },
             "xr-standard-squeeze": { "type": "squeeze" },
             "xr-standard-touchpad": { "type": "touchpad" },
-            "xr-standard-thumbstick": { "type": "thumbstick" },
-            "menu": { "type": "button" }
+            "xr-standard-thumbstick": { "type": "thumbstick" }
         },
         "gamepad": {
             "mapping": "xr-standard",
@@ -29,8 +28,7 @@ const MixedRealityProfile: IMotionControllerLayoutMap = {
                 "xr-standard-trigger",
                 "xr-standard-squeeze",
                 "xr-standard-touchpad",
-                "xr-standard-thumbstick",
-                "menu"
+                "xr-standard-thumbstick"
             ],
             "axes": [
                 { "componentId": "xr-standard-touchpad", "axis": "x-axis" },
@@ -93,11 +91,6 @@ export class WebXRMicrosoftMixedRealityController extends WebXRAbstractMotionCon
                 "rootNodeName": "THUMBSTICK_PRESS",
                 "componentProperty": "state",
                 "states": ["pressed"],
-            },
-            "menu": {
-                "rootNodeName": "MENU",
-                "componentProperty": "state",
-                "states": ["pressed"]
             }
         },
         axes: {
@@ -259,6 +252,6 @@ export class WebXRMicrosoftMixedRealityController extends WebXRAbstractMotionCon
 }
 
 // register the profile
-WebXRMotionControllerManager.RegisterController("microsoft-mixed-reality", (xrInput: XRInputSource, scene: Scene) => {
+WebXRMotionControllerManager.RegisterController("windows-mixed-reality", (xrInput: XRInputSource, scene: Scene) => {
     return new WebXRMicrosoftMixedRealityController(scene, <any>(xrInput.gamepad), xrInput.handedness);
 });

+ 3 - 2
src/Cameras/XR/motionController/webXRMotionControllerManager.ts

@@ -121,11 +121,12 @@ export class WebXRMotionControllerManager {
         this.RegisterFallbacksForProfileId("htc-vive-focus", ["generic-trigger-touchpad"]);
         this.RegisterFallbacksForProfileId("htc-vive", ["generic-trigger-squeeze-touchpad"]);
         this.RegisterFallbacksForProfileId("magicleap-one", ["generic-trigger-squeeze-touchpad"]);
-        this.RegisterFallbacksForProfileId("microsoft-mixed-reality", ["generic-trigger-squeeze-touchpad-thumbstick"]);
+        this.RegisterFallbacksForProfileId("windows-mixed-reality", ["generic-trigger-squeeze-touchpad-thumbstick"]);
+        this.RegisterFallbacksForProfileId("microsoft-mixed-reality", ["windows-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]);
         this.RegisterFallbacksForProfileId("oculus-go", ["generic-trigger-touchpad"]);
         this.RegisterFallbacksForProfileId("oculus-touch-v2", ["oculus-touch", "generic-trigger-squeeze-thumbstick"]);
         this.RegisterFallbacksForProfileId("oculus-touch", ["generic-trigger-squeeze-thumbstick"]);
-        this.RegisterFallbacksForProfileId("samsung-gearvr", ["microsoft-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]);
+        this.RegisterFallbacksForProfileId("samsung-gearvr", ["windows-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]);
         this.RegisterFallbacksForProfileId("samsung-odyssey", ["generic-touchpad"]);
         this.RegisterFallbacksForProfileId("valve-index", ["generic-trigger-squeeze-touchpad-thumbstick"]);
     }