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

Merge pull request #7225 from BabylonJS/thumbstick-values-1

ThumbstickValues now stored in a new variable
David Catuhe пре 5 година
родитељ
комит
04ecaa5bf7
1 измењених фајлова са 2 додато и 4 уклоњено
  1. 2 4
      src/Gamepads/Controllers/windowsMotionController.ts

+ 2 - 4
src/Gamepads/Controllers/windowsMotionController.ts

@@ -597,9 +597,7 @@ export class XRWindowsMotionController extends WindowsMotionController {
     /**
      * holds the thumbstick values (X,Y)
      */
-    public get thumbstickValues(): StickValues {
-        return this.rightStick;
-    }
+    public thumbstickValues: StickValues = { x: 0, y: 0 };
 
     /**
      * Fired when the thumbstick on this controller is clicked
@@ -659,4 +657,4 @@ PoseEnabledControllerHelper._ControllerFactories.push({
     create: (gamepadInfo) => {
         return new WindowsMotionController(gamepadInfo);
     }
-});
+});