Sets the current position of the mouse. Non-integer values are floored.
== Function ==
=== Synopsis ===
<source lang="lua">
love.mouse.setPosition( x, y )
</source>
=== Arguments ===
{{param|number|x|The new position of the mouse along the x-axis.}}
{{param|number|y|The new position of the mouse along the y-axis.}}
=== Returns ===
Nothing.
== Examples ==
Snap the mouse to the horizontal center of the screen while maintaining the coordinate along the y-axis by using [[love.mouse.getY]].
<source lang="lua">
function love.keypressed( )
  love.mouse.setPosition( love.graphics.getWidth() * 0.5, love.mouse.getY() )
end
</source>
== See Also ==
* [[parent::love.mouse]]
* [[love.mouse.getPosition]]
* [[love.mouse.getX]]
* [[love.mouse.getY]]
[[Category:Functions]]
{{#set:Description=Sets the current position of the mouse.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.mouse.setPosition}}