Broken in a-frame 7.0
Opened this issue · 1 comments
jeffbryner commented
Was writing a scene using a-frame release 7.0 for support of mixed reality headsets and couldn't get the keyboard/inputs to work. I noticed the demo uses:
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>If I download the demo code and use 6.1 it works. If I upgrade it to:
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>the input controls no longer function. They load, but don't respond to any input. There are some warnings in the web console, but they appear the same regardless of the a-frame version.
I had a look at the release notes for 7.0; but nothing obvious to me or I'd attempt a PR to fix:
https://github.com/aframevr/aframe/releases
jeffbryner commented
Of course filing an issue reveals the solution. Seems to be in the mouse-cursor change to include it in a-frame. Changing the demo code to:
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/zcanter/aframe-gradient-sky/master/dist/gradientsky.min.js"></script>
<script type="text/javascript">
AFRAME.ASSETS_PATH = ".assets";
</script>
<script src="/js/aframe-material.js"></script>
</head>
<body>
<a-scene cursor="rayOrigin: mouse">
<a-entity laser-controls="hand: right"></a-entity>
<a-entity camera look-controls wasd-controls></a-entity>
works. Key changes:
- (nit) set asset path before loading
- upgrade to aframe 7.0
- set cursor in
- camera using look-controls instead of look-controls enabled