Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ilovelessons on April 06, 2017, 12:05:28 PM
-
Hi,
I was wondering if anyone know how to create a rubbing action. I have a game where I have a magic lamp and I need to rub it a few times and when the player rubs it back and forth enough it sends an event?
I see playmaker has a swipe action.. but thats just for a one swipe in one direction. I need a back and forth rubbing action.. any ideas ?
Thanks
-
You could perhaps have a trigger on the lamp (or one game object with some box triggers along its lengh). You could have variables like TimesToRub and TimesRubbed. You set TimesToRub to something like 5 and when you detect the finger you add 1 to the TimesRubbed. Have a float compare to activate the lamp when TimesToRub=TimesRubbed and a wait action to reset the TimesRubbed after a few seconds.
Maybe not a major idea (ba dum tish) but might work.