- Home /
Question by
mrchaosllama · Apr 07, 2013 at 01:49 AM ·
animationplay
How can I make an animation play after a button is pressed?
So, I've got an animation and I want it to play on that object after I click. This is the java code I wrote:
if (Input.GetButtonDown ("Fire1")) {
animation.Play("recoil");
}}
Excuse me if it's completely wrong, the only code I know is some basic python. Can someone correct this code for me?
Comment
Answer by mrchaosllama · Apr 07, 2013 at 03:14 AM
Ohh I'm clever (DERP) I forgot to add: function Update() { Before it...
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
what is the jump axis for if (Input.GetAxis(" ? ") 2 Answers
Camera Animation On Click Help? 1 Answer
Mecanim Animations float til end of animation 1 Answer
How to export MMD model to Unity? 0 Answers