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
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [client](./client.md) > [HytopiaUI](./client.hytopiaui.md) > [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