Skip to content

Commit a9b4550

Browse files
committed
Fixed hapticActuators didn't work
1 parent 3b8b9ad commit a9b4550

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

Build/Build/Build.data

2.23 KB
Binary file not shown.

Build/Build/Build.framework.js

Lines changed: 24 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Build/Build/Build.wasm

519 Bytes
Binary file not shown.

Packages/webxr/Runtime/Plugins/WebGL/webxr.jspre

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ setTimeout(function () {
567567
controller = this.xrData.controllerB;
568568
break;
569569
}
570-
if (controller && controller.enabled == 1 && controller.gamepad && controller.gamepad.hapticActuators && controller.gamepad.hapticActuators.length > 0)
570+
if (controller && Module.HEAPF32[controller.enabledIndex] == 1 && controller.gamepad && controller.gamepad.hapticActuators && controller.gamepad.hapticActuators.length > 0)
571571
{
572572
controller.gamepad.hapticActuators[0].pulse(hapticPulseAction.detail.intensity, hapticPulseAction.detail.duration);
573573
}

0 commit comments

Comments
 (0)