Skip to content

Mouse Pointer Lock

This behavior removes the limit on the distance the mouse can move and hides the cursor.

Authors and contributors to this community extension: PANDAKO.


This behavior removes the limit on the distance the mouse can move and hides the cursor.

For example, a user can rotate or continue to manipulate an object by moving the mouse endlessly. Without the pointer lock, the rotation or operation will stop the moment the pointer reaches the edge of the browser or screen.

Game players don't have to worry about leaving the gameplay area or accidentally clicking on another application that moves the mouse focus away from the game.

Locking the pointer locks MouseX() and MouseY() expressions. Use MovementX() and MovementY() instead.

Read more...


Tip

Learn how to install new extensions by following a step-by-step guide.

This page is an auto-generated reference page about the Mouse Pointer Lock extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.