fix haptics for dot beats

This commit is contained in:
Kevin Ngo
2018-12-02 23:43:28 -08:00
parent 8908a97121
commit 4ae56a9f31
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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