- Home /
How do I ''Apply'' the animations to characters?
Well, I am quite a noob to unity, but I got a problem with animations. So, I have a character with animations imported into unity, and I want to make the animations play when I press certain keys. Now, I'm not sure if I have to script this or can I just use the 3rd person control component? I'm trying out the 3rd person component, and Animation component, just like I saw in some tutorials, but it doesn't work. It doesn't display any animation at all. So, how exactly would I make the animations work in game?
Thanks for any replies.
Answer by Cherno · Sep 24, 2014 at 11:12 PM
In your character's animation component, set the animation array size to the number of different animations, and then for each field choose one of the animation clips from the list that appears (or drag them there from your imported model's hierarchy). Wether they can be played or not by the Controller script depends on their name, first and foremost. You can play any animation clip that has been added to an Animation component with animation.Play("animName"); or animation.CrossFade("animName", 0.3f). Read the Unity AI for further information.
I did everything as you said in the components. But I do need some script anyway, right? I'm an absolute beginner to code, and I have no idea how to do ANYTHING, so do you perhaps know any beginner tutorials about this that I can follow? I can't find anything that can help me. Thanks a lot for answering though C: