Skip to content

Commit 324d150

Browse files
committed
Bug fix for axes input data
1 parent d78260c commit 324d150

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Assets/WebGLTemplates/WebXR/webxr.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,16 @@
374374
for (var j = 0; j < inputSource.gamepad.axes.length; j++) {
375375
switch (j) {
376376
case 0:
377-
controller.touchpadX = inputSource.gamepad.axes[j].value;
377+
controller.touchpadX = inputSource.gamepad.axes[j];
378378
break;
379379
case 1:
380-
controller.touchpadY = inputSource.gamepad.axes[j].value;
380+
controller.touchpadY = inputSource.gamepad.axes[j];
381381
break;
382382
case 2:
383-
controller.thumbstickX = inputSource.gamepad.axes[j].value;
383+
controller.thumbstickX = inputSource.gamepad.axes[j];
384384
break;
385385
case 3:
386-
controller.thumbstickY = inputSource.gamepad.axes[j].value;
386+
controller.thumbstickY = inputSource.gamepad.axes[j];
387387
break;
388388
}
389389
}

Assets/WebGLTemplates/WebXRFullView/webxr.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,16 @@
374374
for (var j = 0; j < inputSource.gamepad.axes.length; j++) {
375375
switch (j) {
376376
case 0:
377-
controller.touchpadX = inputSource.gamepad.axes[j].value;
377+
controller.touchpadX = inputSource.gamepad.axes[j];
378378
break;
379379
case 1:
380-
controller.touchpadY = inputSource.gamepad.axes[j].value;
380+
controller.touchpadY = inputSource.gamepad.axes[j];
381381
break;
382382
case 2:
383-
controller.thumbstickX = inputSource.gamepad.axes[j].value;
383+
controller.thumbstickX = inputSource.gamepad.axes[j];
384384
break;
385385
case 3:
386-
controller.thumbstickY = inputSource.gamepad.axes[j].value;
386+
controller.thumbstickY = inputSource.gamepad.axes[j];
387387
break;
388388
}
389389
}

Build/webxr.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,16 @@
374374
for (var j = 0; j < inputSource.gamepad.axes.length; j++) {
375375
switch (j) {
376376
case 0:
377-
controller.touchpadX = inputSource.gamepad.axes[j].value;
377+
controller.touchpadX = inputSource.gamepad.axes[j];
378378
break;
379379
case 1:
380-
controller.touchpadY = inputSource.gamepad.axes[j].value;
380+
controller.touchpadY = inputSource.gamepad.axes[j];
381381
break;
382382
case 2:
383-
controller.thumbstickX = inputSource.gamepad.axes[j].value;
383+
controller.thumbstickX = inputSource.gamepad.axes[j];
384384
break;
385385
case 3:
386-
controller.thumbstickY = inputSource.gamepad.axes[j].value;
386+
controller.thumbstickY = inputSource.gamepad.axes[j];
387387
break;
388388
}
389389
}

0 commit comments

Comments
 (0)