6

How to disable the keyboard controls for the camera in the default scene?

<a-scene></a-scene>
ngokevin
  • 12,980
  • 2
  • 38
  • 84

1 Answers1

11

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>
ngokevin
  • 12,980
  • 2
  • 38
  • 84