love.mouse.setPosition( x, y )
Sets the current position of the mouse. Note that this generates a mousemoved event.
Usage
love.mouse.setPosition( x, y )
Arguments
xThe new x-position.
yThe new y-position.
Returns
Nothing
Examples
Example 1: Moving the mouse to the center of the screen.
function load()
local w = love.graphics.getWidth()
local h = love.graphics.getHeight()
love.mouse.setPosition(w/2, h/2)
end