Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: bizilux on January 27, 2014, 08:11:52 AM
-
hey all...
so im making racing game... and i need help with car movement buttons...
(attachment 1)
they are sprites with 3d box collider, parented to main camera. they work perfectly... there is only one problem
if i put my finger on gas, and then release my finger while its still withing collider of gas, then it detects that finger was released.
but if i put my finger on gas, and drag my finger off the gas button, it doesnt detect that finger was dragged off the gas collider, so if i release my finger somewhere not on gas sprite, then it wont detect that finger was lifted, so it will just keep the throttle at full.
so basically it works perfectly if player keeps his finger on throttle, but as long as he drags finger off throttle sprite, it breaks functionality...
so what am i missing?
i found this however: http://hutonggames.com/playmakerforum/index.php?topic=1997.0 anything in there that will fix my problem?
-
anyone? :)
basically all i would need is: "moved off" event
-
On state 2 have touched moved looped back to state 1.
So if your finger dose move then you check if it over the button.
I think that should work.
-
good try, but it doesnt work... because as soon as it detects "touch moved" it goes to state 1, but then you still have ur finger on screen, so state 1, wont trigger off "touch began" because you didnt lift finger and pressed it again.
i think it has to be done some other way...
it basically wont trigger state 1 again, because you didnt lift ur finger... so touch object event action, will not trigger
-
Hi,
You should use ngui and then you could have all these events ready made for you.
https://hutonggames.fogbugz.com/?W1111
bye,
Jean