Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » HELP » Help (General) » need help with animation

need help with animation

View previous topic View next topic Go down  Message [Page 1 of 1]

1 need help with animation on Sun May 11, 2014 3:32 am

Survivor


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
i have a question about animation, i have a monster model in obj format imported to unity, and i have it's own animations in an fbx format. now how  can i add the animations to the monster?



Last edited by servival on Mon May 12, 2014 2:45 am; edited 1 time in total

View user profile

2 Re: need help with animation on Sun May 11, 2014 6:48 pm

ryan2brian


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
step 1 put the monster in hierarchy

step 2 click on the monster hierarchy and look over to the inspector and click add component and and type animation.

step 3 in the animation type how many animation you have

step 4 select the animation you wont to put on the monster and drag and drop it in the animation you opened up

View user profile

3 Re: need help with animation on Mon May 12, 2014 8:23 pm

Also to add to ryan2brian's post, make sure the animation type is legacy, not generic. So when u click on the animation in the project assets, in the inspector make sure animation type is legacy (under rig)

View user profile http://www.youtube.com/user/misterninjaboy

4 Re: need help with animation on Tue May 13, 2014 4:34 am

Survivor


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
MisterNinjaBoy wrote:Also to add to ryan2brian's post, make sure the animation type is legacy, not generic. So when u click on the animation in the project assets, in the inspector make sure animation type is legacy (under rig)
Should i do that to the animation file or the monster file? or both?

View user profile

5 Re: need help with animation on Tue May 13, 2014 4:39 am

Survivor


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
MisterNinjaBoy wrote:Also to add to ryan2brian's post, make sure the animation type is legacy, not generic. So when u click on the animation in the project assets, in the inspector make sure animation type is legacy (under rig)
I followed the steps but when i draged and droped the monster in the scene and started the game it didn't play the animation, is that what supposed to happen? or am i doing it wrong? Suspect 

View user profile

6 Re: need help with animation on Tue May 13, 2014 4:40 am

Survivor


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
ryan2brian wrote:step 1 put the monster in hierarchy

step 2 click on the monster hierarchy and look over to the inspector and click add component and and type animation.

step 3 in the animation type how many animation you have

step 4 select the animation you wont to put on the monster and drag and drop it in the animation you opened up

I followed the steps but when i draged and droped the monster in the scene and started the game it didn't play the animation, is that what supposed to happen? or am i doing it wrong?  Suspect 

View user profile

7 Re: need help with animation on Tue May 13, 2014 6:56 pm

ryan2brian


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
maybe you dont have anything to trigger your animation i think i have a script someway on my hard drive if i can find it i well share it with you

View user profile

8 Re: need help with animation on Tue May 13, 2014 8:58 pm

ryan2brian


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
ok make a c# call it PlayAnimations and past this into it


using UnityEngine;
using System.Collections;

public class PlayAnimations : MonoBehaviour {
public AnimationClip clip;
public KeyCode code = KeyCode.Mouse0;

void Start()
{
if (!animation) this.enabled = false;
}

void Update()
{
if (animation)
{
if (Input.GetKeyDown(code)) animation.Play(clip.name);
}
}
}

View user profile

9 Re: need help with animation on Wed May 14, 2014 3:39 am

Survivor


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
ryan2brian wrote:ok make a c# call it PlayAnimations and past this into it


using UnityEngine;
using System.Collections;

public class PlayAnimations : MonoBehaviour {
   public AnimationClip clip;
   public KeyCode code = KeyCode.Mouse0;

   void Start()
   {
       if (!animation) this.enabled = false;
   }

   void Update()
   {
       if (animation)
       {
           if (Input.GetKeyDown(code)) animation.Play(clip.name);
       }
   }
}
Thanks a lot man you realy helped me  Razz 

View user profile

10 Re: need help with animation on Wed May 14, 2014 7:59 am

ryan2brian


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
did it work

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum