FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionneed help with animation

more_horiz
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

descriptionRe: need help with animation

more_horiz
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

descriptionRe: need help with animation

more_horiz
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)

descriptionRe: need help with animation

more_horiz
@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?

descriptionRe: need help with animation

more_horiz
@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 

descriptionRe: need help with animation

more_horiz
@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 

descriptionRe: need help with animation

more_horiz
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

descriptionRe: need help with animation

more_horiz
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);
}
}
}

descriptionRe: need help with animation

more_horiz
@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 

descriptionRe: need help with animation

more_horiz
did it work
Permissions in this forum:
You cannot reply to topics in this forum