Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: allornothing on March 05, 2015, 05:57:41 AM

Title: Differentiating between a click / drag - best practices?
Post by: allornothing on March 05, 2015, 05:57:41 AM
Hey

I have an inventory system where you can drag items around (using follow mouse actions) which works really well, but I'd like to be able to click on the same game object to bring up an item info panel.

My first thought would be to look at the time the click is held down, and if its below a certain threshold, consider it a 'click' and if more, then consider it a 'drag' - is that the right way? Are there better/cleaner ways to deal with this kind of thing?