Skip to content

Commit b9225ba

Browse files
authored
Merge pull request #193 from De-Panther/fix_haptics
Fixed hapticActuators didn't work
2 parents 3b8b9ad + c8cef0b commit b9225ba

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-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/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
- hapticActuators didn't work.
810

911
## [0.13.0] - 2021-10-18
1012
### Added

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)