Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: thierry_st_malo on April 27, 2015, 09:08:00 AM
-
Hi, I'm a newbie with PlayMaker, so my question is probably ridiculous. Sorry about that.
Following this link :
http://hutonggames.com/playmakerforum/index.php?topic=47.0
I've created an FPS Controller. Everything is fine, except that when I start rotating my camera, it keeps rotating forever and ever unless I hit very quickly the other direction's key.
But I want the rotation to stop instantly as soon as I release the key ( by the way this is what happens with tranlation ). How can I do that ?
Thierry
P.S : I use Unity 5.0
-
Key and Button Presses come in 3 flavors. Get button Down and Get button up are both basically a Boolean state that can only be true for a quick moment . Get Button will be true while you hold the button.
So try something like state1 (Get Key ) goto state2 and rotate in desire direction but (on key up) go back to state1.
-
Thanks, Redikann :-)