borismus / ray-input

http://smus.com/ray-input-webvr-interaction-patterns
Apache License 2.0
139 stars 20 forks source link

cardboard button not firing on touch unless I remove e.preventDefault() on touchEnd; #14

Closed bunnybones1 closed 3 years ago

bunnybones1 commented 7 years ago

I've had to comment out ray-controller.js:200 to get the onScreen buttons to work

  onTouchEnd_(e) {
    this.endDragging_();

    // Prevent synthetic mouse event from being created.
    // e.preventDefault();
    this.isTouchActive = false;
  }

Is there another way to get them to work without doing this? Hard to believe I'm the only one with this problem unless I'm doing something wrong. :)

arturitu commented 7 years ago

@bunnybones1 I have the same issue here (you are not alone).

arturitu commented 7 years ago

And only works with this commented line with Chrome Beta, isn't it?

borismus commented 7 years ago

Sorry for delay, which on screen buttons are you talking about?

arturitu commented 7 years ago

@borismus fullscreen and cardboard buttons on the bottom right

klausw commented 7 years ago

Proposed fix here: https://github.com/borismus/ray-input/pull/26