util.input.set_cursor_position

Client

Moves the cursor to a specific position relative to the root viewport


Syntax

local status = util.input.set_cursor_position(
    position
)

Parameters

TypeNameDescription
vector2positionTarget cursor position as {x, y} in pixels, relative to the root viewport

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Snap the cursor to a fixed position
util.input.set_cursor_position({100, 100})

On this page