I was puzzled with resetting camera rotation, I wrote a simple component to reset camera rotation, the code is published at aframe demo
I add 'click' event listener to the blue box, if the box was clicked. then, i would reset camera rotation to {x:0,y:0,z:0}
. but, as you see, there is no effects. I step in to my component and i found my code did work, but something set the rotation back after my function.
I have tried:
- use
look-controls
instead ofuniversal-control
. in this way, it works on the PC browser but my mobile phone. - use a newer
aframe-extras
lib, v3.1.0. and I got an error 'Cannot read property x of undefined' ataframe-extras.js:5265
.
Anyone hints?