UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

55 lines (26 loc) 1.08 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [freezePointerLock](./client.hytopiaui.freezepointerlock.md) ## HytopiaUI.freezePointerLock() method Freezes or unfreezes the pointer lock state. Preventing player inputs from automatically locking or unlocking the pointer. Esc key will still unlock the pointer - this is a system level feature that cannot be overriden. Pointer lock only affects Desktop devices. **Signature:** ```typescript freezePointerLock(freeze: boolean): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> freeze </td><td> boolean </td><td> When `true`<!-- -->, the pointer lock will be frozen in the current state, preventing changes until `false` is passed again or player.ui.freezePointerLock(false) is called by the server. </td></tr> </tbody></table> **Returns:** void