After jump animation problem
So, first of all, I have imported the jump animation and the character as Humanoid from mixamo. The problem is that when the player jumps, he does it, but when the animation is finished, he keeps a position. In those 2 links there are the screenshots about the player position and the jump animation settings.
Player position: http://prnt.sc/b7kdlr
Jump animation settings: http://prnt.sc/b7kfgl
I have a script too, but it is really easy: using UnityEngine; using System.Collections;
public class Movement : MonoBehaviour {
Animator anim;
void Start () {
anim = GetComponent<Animator>();
}
void Update () {
Move();
Jump();
}
void Move()
{
if (Input.GetButtonDown("Vertical"))
{
anim.SetBool("isWalking", true);
}
if (Input.GetButtonUp("Vertical"))
{
anim.SetBool("isWalking", false);
}
if (Input.GetKeyDown(KeyCode.LeftShift))
{
anim.SetBool("isRunning", true);
}
if (Input.GetKeyUp(KeyCode.LeftShift) || Input.GetButtonUp("Vertical"))
{
anim.SetBool("isRunning", false);
}
}
void Jump()
{
if (Input.GetButtonDown("Jump"))
{
anim.SetTrigger("isJumping");
}
}
}
I just realized that when the player jumps but after I don't press any key he stays in this position. So for example, if I jump but then I press the W he jumps but he keeps going forward too. So the problem now is, why when he stops jumping he "doesn't go" to the idle layer ?