setCursorPosition
Cliente
Mueve el cursor a un punto de la pantalla.
bool setCursorPosition(float x, y)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| x, y | float | Posición en píxeles, o un vec2. Los valores fuera de la pantalla se ajustan al borde. |
Retorno
true cuando se pidió el movimiento.
Ejemplo
local width, height = getScreenSize()
showCursor(true)
setCursorPosition(width / 2, height / 2)