Skip to content

Commit

Permalink
Check for the existance of the quest controller model button part bef…
Browse files Browse the repository at this point in the history
…ore animating on interaction. Some don't have one like the controller surface
  • Loading branch information
dmarcos committed Nov 15, 2023
1 parent f7e56a8 commit da8dc14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/oculus-touch-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
var button = this.mapping[this.data.hand].buttons[evt.detail.id];
var buttonObjects = this.buttonObjects;
var analogValue;
if (!buttonObjects) { return; }
if (!buttonObjects || !buttonObjects[button]) { return; }
analogValue = evt.detail.state.value;
buttonObjects[button].quaternion.slerpQuaternions(
this.buttonRanges[button].min.quaternion,
Expand Down

0 comments on commit da8dc14

Please sign in to comment.