diff --git a/src/components/beat.js b/src/components/beat.js index f2f689a..1cf2bf1 100644 --- a/src/components/beat.js +++ b/src/components/beat.js @@ -672,7 +672,7 @@ AFRAME.registerComponent('beat', { } // Notify for haptics. - this.el.emit(`beatcollide${this.hitHand}`, null, true); + this.el.emit(`beatcollide${hand}`, null, true); // Sound. this.el.parentNode.components['beat-hit-sound'].playSound( @@ -688,7 +688,7 @@ AFRAME.registerComponent('beat', { if (saberBoundingBox.intersectsBox(beatBoundingBox)) { // Notify for haptics. - this.el.emit(`beatcollide${this.hitHand}`, null, true); + this.el.emit(`beatcollide${hand}`, null, true); // Sound. this.el.parentNode.components['beat-hit-sound'].playSound(this.el); diff --git a/src/index.html b/src/index.html index 5a52880..1dd2488 100644 --- a/src/index.html +++ b/src/index.html @@ -147,7 +147,7 @@ bind__saber-particles="enabled: isPlaying" bind__trail="enabled: isPlaying" haptics="events: mouseenter; dur: 35; force: 0.075" - haptics__beat="eventsFrom: #beatContainer; events: beatcollide{{ hand }}; dur: 80; force: 0.2" + haptics__beat="eventsFrom: #beatContainer; events: beatcollide{{ hand }}; dur: 80; force: 0.3" haptics__draw="events: drawblade; dur: 750; force: 0.025" haptics-saber haptics-wall