mouse position

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
adrywalsh
Prole
Posts: 20
Joined: Fri Feb 26, 2010 7:24 am

mouse position

Post by adrywalsh »

Code: Select all

function love.mousereleased (x,y,button)
...
love.mouse.setVisible(false)
...
causes my mouse's position to become 0,0 for one frame upon moving the mouse for the first time after this is called.
What is the best way to get around this?

In my program my player is controlled by the position of the mouse and snaps to the top of the screen the first moment the mouse is moved, and then leaps down to the correct position.
while (1)
do LÖVE
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: mouse position

Post by Robin »

One workaround would be to ignore the mouse position if it is at 0,0.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 194 guests