Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Speed to WASD Controls for A-Frame

Tags:

aframe

webvr

How can I increase the speed of the WASD Controls for my WebVR page? Because now it goes really slow.

<a-entity position="0 1.8 0" camera look-controls wasd-controls>
  <a-camera id="camera">
    <a-cursor color="#333" maxDistance="30"></a-cursor>
  </a-camera>
</a-entity>
like image 507
Dionoh Avatar asked Feb 07 '17 10:02

Dionoh


Video Answer


1 Answers

The wasd-controls component has several options, described in the A-Frame v0.4.0 docs. Increasing acceleration, or decreasing easing, will both make the camera move faster.

<a-entity camera look-controls wasd-controls="acceleration: 100">
  <!-- ... -->
</a-entity>
like image 83
Don McCurdy Avatar answered Oct 18 '22 15:10

Don McCurdy