TransWikia.com

Add Speed to WASD Controls for A-Frame

Stack Overflow Asked by Dionoh on January 19, 2021

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>

2 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>

Correct answer by Don McCurdy on January 19, 2021

The acceleration config does not affect top speed. If you are looking to change top speed, I made a fork of aframe that includes configs for speed as well as new features like gravity, look sensitivity, and Y-axis inversion.

Answered by Kiran Kota on January 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP