I'm trying to track the mouse position from the moment I press left click, until I release the button. How can I achieve this ? MouseInfo for some reason registers every mouse movement (while left click is pressed) as another click.
// Globally boolean pressed = false; // In act method if(Greenfoot.mousePressed(null)) pressed = true; else if(Greenfoot.mouseClicked(null)) pressed = false;
if(Greenfoot.mousePressed(theActor)) ...