I’m a little confused about getting a rigged model to move with its walk animation. First I created a walk cycle in Blender that just walks in place. Import everything into Unity just fine and set it up through Mecanim. The character walks when I press the proper input but it doesn’t move. Here’s the script I used:
public class Locomotion : MonoBehaviour {
Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
float move = Input.GetAxis("Vertical");
anim.SetFloat("Speed", move);
}
}
Then I figured maybe the rig actually has to move in Blender. So I do another walk cycle of the rig physically walking forward and import that. Except, the model will walk forward then rest back to the original position. Setting it to loop makes the model walk in place.
What am I missing in this process?