# Pointer Lock Controls WASD

**URL:** <https://discourse.threejs.org/t/pointer-lock-controls-wasd/25465>\
**Category:** Questions\
**Tags:** pointerlockcontrols\
**Created:** [April 18, 2021, 11:09am UTC](https://discourse.threejs.org/t/pointer-lock-controls-wasd/25465 "2021-04-18T11:09:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shange](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Shange](https://discourse.threejs.org/u/Shange)\
**Post date:** [April 18, 2021, 11:09am UTC](https://discourse.threejs.org/t/pointer-lock-controls-wasd/25465/1 "2021-04-18T11:09:27Z")

</div>

I’m trying to recreate the Pointer Lock Controls from [three.js examples](https://threejs.org/examples/?q=cont#misc_controls_pointerlock) but having trouble getting the controls to work, see my code here: [Glitch :･ﾟ✧](https://glitch.com/edit/#!/pointer-lock-controls) any help would be appreciated

 ![Screenshot 2021-04-18 at 12.08.14](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/e/7/e7885bea0151b4ee42f058a4a5c62c6abbbd0e90.jpeg)

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [April 18, 2021, 11:18am UTC](https://discourse.threejs.org/t/pointer-lock-controls-wasd/25465/2 "2021-04-18T11:18:21Z")

</div>

The mouse is not captured automatically at application start since this is technically not possible. It’s required to use a mouse interaction to trigger the mouse lock. The official example uses a simple splash screen for this purpose.

I suggest you study the underlying Pointer Lock API for more background information:

[https://developer.mozilla.org/en-US/docs/Web/API/Pointer\_Lock\_API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API)

---

<div class="post-metadata">

**Author:** ![Shange](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Shange](https://discourse.threejs.org/u/Shange)\
**Post date:** [April 22, 2021, 2:57pm UTC](https://discourse.threejs.org/t/pointer-lock-controls-wasd/25465/3 "2021-04-22T14:57:27Z")

</div>

I’ve added a splash screen but still can’t get the controls to work, see my code here: [Glitch :･ﾟ✧](https://glitch.com/edit/#!/pointer-lock-controls) is there something I am missing?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [April 22, 2021, 8:21pm UTC](https://discourse.threejs.org/t/pointer-lock-controls-wasd/25465/4 "2021-04-22T20:21:15Z")

</div>

I’ve answered you here: [Splash screen for pointer lock controls - #2 by Mugen87](https://discourse.threejs.org/t/splash-screen-for-pointer-lock-controls/25601/2)
