0
\$\begingroup\$

I added a jump animation with the character in unity and to move the character I have some code like this:

if (Input.GetKeyDown(KeyCode.Space))
    {

        transform.Translate(Vector3.forward * 1 * jumpSpeed);
        Anim.SetTrigger("is_jumping");
    }

But here the character first moving its position (like a glitch) and then doing the animation. How can I make them happen at the same time?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.