Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: VascBogdan on April 18, 2015, 02:12:54 AM

Title: Check if mouse is moving
Post by: VascBogdan on April 18, 2015, 02:12:54 AM
How can I check if the mouse is moving ? I need it for a rub, first I check if mouse is holded down then if it is moving. Is there a way ?
Title: Re: Check if mouse is moving
Post by: TheBadFeeling on April 18, 2015, 03:30:03 AM
How about getting the mouseX and Y when you register the mouse button down and storing them in variables -- and then comparing them to new mouseX and Y coordinates every frame until the mouse is released?

If the differences are larger or smaller than any tolerance you specify, then the "rub" happened.

/Bad
Title: Re: Check if mouse is moving
Post by: VascBogdan on April 18, 2015, 03:37:58 AM
Sounds a bit complicated but I am going to try it now. I will reply with the result.
Title: Re: Check if mouse is moving
Post by: VascBogdan on April 18, 2015, 03:48:42 AM
I actually made it work :) Thank you very much .
Title: Re: Check if mouse is moving
Post by: TheBadFeeling on April 18, 2015, 08:18:05 AM
You're very welcome!  8)

/Bad