Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug embedded scene mouse cursor ray-origin #3410

Closed
tiagoernst opened this issue Mar 1, 2018 · 3 comments
Closed

Bug embedded scene mouse cursor ray-origin #3410

tiagoernst opened this issue Mar 1, 2018 · 3 comments

Comments

@tiagoernst
Copy link

Description:

  • A-Frame Version: 0.7.1 , 0.7.0
  • Platform / Device: Desktop chrome version 64.0 .
  • Reproducible Code Snippet or URL:

//code starts here

<title>Embeded scene mouse cursor bug</title> <script src="https://aframe.io/releases/0.7.1/aframe.min.js"></script>
  </a-scene >
  <script type="text/javascript">
      var box =document.querySelector('a-box');
      box.addEventListener('mouseenter',function(){
        this.setAttribute('scale','2 2 2')
      });
      box.addEventListener('mouseleave',function(){
        this.setAttribute('scale','1 1 1')
      });
  </script>
</div>

explanation :
There seems to be a bug with the embedded scene and the option of mouse cursor (rayOrigin: mouse),
i've put an mouseenter and mouseleave event on a box to change it's size. It works fine as long as the page is contained in the browser, but when the page is "scrollable" the events get messed up ( like showed in the gif). I don't know if I messed up somewhere but it seems that it comes from Aframe .

bug_emebedded_scene

@tiagoernst
Copy link
Author

body style='height:800px;width:100%;'>
div class="" style='height:250px;width:450px;margin-left:100px;margin-top:300px;background-color:black'>
a-scene embedded='true' cursor="rayOrigin: mouse">
a-box id='box' position='0 0 -5' color='red'>
a-sky color='blue'>
a-camera >
/a-camera>

  /a-scene >

PS : html code wasn't appearing (took off the '<' for it to be visible )

@mkungla
Copy link
Contributor

mkungla commented Mar 15, 2018

indeed it is a bug: /examples/test/embedded-cursor/ add style

body {
  height:200vh;
}

and as you can see raycaster don't check scroll changes so your clicks get scroll offset

@viperphase1
Copy link
Contributor

viperphase1 commented Jul 19, 2018

I'm getting the same issue. If the scene is off screen and then moved on screen you'll never be able to interact with the objects in the scene.
This is still a problem in version 0.8.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants