Example
Setting the mouse position
Example 0004: Setting the mouse position
  1. -- Example: Setting the mouse position 
  2.  
  3. -- Press a key to move the mouse to 
  4. -- some random point. 
  5. function keypressed(k) 
  6.     local x, y = math.random(0,800), math.random(0,600
  7.     love.mouse.setPosition(x, y) 
  8. end 
Copyright © 2006-2008 LÖVE Development Team.