setCursorPosition
Client
Moves the cursor to a point on the screen.
bool setCursorPosition(float x, y)
Parameters
| Name | Type | Description |
|---|---|---|
| x, y | float | Position in pixels, or a vec2. Values off the screen are clamped to its edge. |
Returns
true when the move was requested.
Example
local width, height = getScreenSize()
showCursor(true)
setCursorPosition(width / 2, height / 2)