- Home /
How to launch an animation pressing e
Verán es que tengo una puerta al estilo futurista y tengo su animación de abrirse, y quiero poner que al pulsar la tecla "e" se ejecute la animación.
Gracias
Comment
Debe de hablar ingles!!!
We don't all speak your language (looks like spanish to me), so you need to ask in ingles.
All in all, he is asking, how to launch an animation pressing e.
Best Answer
Answer by Berenger · Feb 28, 2014 at 09:47 AM
First get the input
if(Input(GetKeyDown(KeyCode.E))
Then, start the animation, assuming it's on the same gameobject and the animation state is the default one
animation.Play();
Doc : http://docs.unity3d.com/Documentation/ScriptReference/Animation.html
Thank You, does not speak very good English, and write less. Thank you for responding