How to disable the keyboard controls for the camera in the default scene?
<a-scene></a-scene>
The wasd-controls
component is attached to the default camera by default. You can either:
Define <a-camera>
with wasd-controls
disabled to override the default one:
<a-scene><a-camera wasd-controls-enabled="false"></a-camera></a-scene>
Or remove it with removeAttribute
(when the scene is ready):
document.querySelector('[camera]').removeAttribute('wasd-controls');
Or define a raw camera without wasd-controls
:
<a-entity camera="userHeight: 1.6" look-controls></a-entity>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With