I would like to simulate a user input in my Webvr application. Is there any way to simulate look controls in Aframe?
<a-entity listener position="0 0 0" id="camera" camera="userHeight: 1.6" look-controls>
I would like to simulate a user input in my Webvr application. Is there any way to simulate look controls in Aframe?
<a-entity listener position="0 0 0" id="camera" camera="userHeight: 1.6" look-controls>
You could also try https://github.com/dmarcos/aframe-motion-capture-components to record/replay/simulate head and controller movements/events. Doesn't support listening to window click yet though.
To simulate user input and somehow pass that into look-controls
would be extremely difficult. If you're determined, check out the WebVR API Emulation chrome extension and its code.
What would be easier, though, is to implement your own A-Frame component for controls, perhaps using look-controls
as the starting point. I've done this several times, to write controls for gamepad, teleportation, touch-screen-to-move, and so on. Check out the controls components in a-frame extras here: https://github.com/donmccurdy/aframe-extras/tree/master/src/controls. If those don't work for you, you can use it as a starting point for your own code, or register an extension to universal-controls
.