|
Hello, I want to play an animation. I did a script, but it doesn't works at all. When I press "P" the animation plays all, only if I keep pressed "P". But I want to play the complete animation when I pressed "P" just once. Here's my script: Blockquote This is a separate script from ThirdPersonController (I'm using ThirdPersonController, too) Any ideas?
(comments are locked)
|
|
You want to press 'P' only once is not it? Then use the GetKeyUp, which detects when you release the button, causing you to not be holding the key Link: http://unity3d.com/support/documentation/ScriptReference/Input.GetKeyUp.html Hope this help ^^
(comments are locked)
|

Tried using getkeydown instead?
that won't help. have you tried disabling ThridPersonController?