wasd-controls

Note: This documentation is for the old 0.2.0 version of A-Frame. Check out the documentation for the current 0.5.0 version

The wasd-controls component defines the behavior of an entity to be controlled by the WASD keyboard keys. It is usually used alongside the camera component.

Example

<a-entity camera look-controls wasd-controls></a-entity>

Properties

PropertyDescriptionDefault Value
accelerationHow fast the entity accelerates when holding the keys.65
adAxisAxis that the A and D keys act upon.x
adInvertedWhether the axis that the A and D keys act upon are inverted.false
easingHow fast the entity decelerates after releasing the keys. Like friction.20
enabledWhether the WASD controls are enabled.true
flyWhether or not movement is restricted to the entity’s initial plane.false
wsAxisAxis that the W and S keys act upon.z
wsInvertedWhether the axis that the W and S keys act upon are inverted.false