{{newin|[[0.9.2]]|092|type=function}}
Sets whether relative mode is enabled for the mouse.

When relative mode is enabled, the cursor is hidden and doesn't move when the mouse does, but relative mouse motion events are still generated via [[love.mousemoved]]. This lets the mouse move in any direction indefinitely without the cursor getting stuck at the edges of the screen.

The reported position of the mouse may not be updated while relative mode is enabled, even when relative mouse [[love.mousemoved|motion events]] are generated.
== Function ==
=== Synopsis ===
<source lang="lua">
love.mouse.setRelativeMode( enable )
</source>
=== Arguments ===
{{param|boolean|enable|True to enable relative mode, false to disable it.}}
=== Returns ===
Nothing.
== See Also ==
* [[parent::love.mouse]]
* [[love.mouse.getRelativeMode]]
* [[love.mousemoved]]
[[Category:Functions]]
{{#set:Description=Sets whether relative mode is enabled for the mouse.}}
== Other Languages ==
{{i18n|love.mouse.setRelativeMode}}