- Home /
Question by
wesleyd1124 · Mar 03, 2013 at 05:05 PM ·
animations
Playing Animations?
How do you play animations that are in the animations part of the animation component This is my code var punch:AnimationClip;
function Update(){
if(Input.GetMouseButtonDown(0)){
gameObject.PlayAnimation(punch);
}
}
For some Reason punch.Play() and gameObject.PlayAnimation(punch); does not work please help. Also its from blender so I don't know if that effects anything.
Comment
Answer by Coreyf716 · Mar 03, 2013 at 05:12 PM
Animations are sorted by string, so it would look like this:
if (Input.GetMouseButtonDown(0))
animation.Play("punch");
It still won't work Its from blender so that might have something to do with it
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Disable Mouse Look(script) completely 0 Answers
setup a php master server 2 Answers
I want each face of an object to be a different color 1 Answer