An aframe component for "wasd"-like motion on mobile. Demo here: https://sour-lyric.glitch.me/
Many thanks to @yoannmoinet for creating NippleJS. This project is 95% NippleJS with a small adaptation for A-Frame
You'll need to include the script in your project:
<script src="https://cdn.rawgit.com/mrturck/aframe-joystick/master/joystick.min.js"></script>
Second, add id="camera"
to your camera element,
or create a new camera entity with id="camera"
:
<a-entity camera id="camera" position="0 1.6 0" look-controls wasd-controls>
Add joystick
to your a-scene
element
<a-scene joystick>
If you are using the joystick
to replace VR controls, then you'll probably want to hide the vr-mode-ui
button.
Do this by adding vr-mode-ui="enabled: false"
to your a-scene
element (example below):
<a-scene joystick vr-mode-ui="enabled: false">