Animation Help

Hi,

The assets I used includes a jumping animation, so I went ahead and added that to my project, but the animation gets hung up on the last frame and doesn’t revert to its previous state (Idling, Running)

Imgur: The magic of the Internet Idle to jumping is set to true, and it’s reverse to false. Same with running and jumping0.

void OnJump(InputValue value)

{

if(value.isPressed)

{

    myAnimator.SetBool("isJumping", true); // Set the IsJumping parameter to true

    myRigidBody.velocity += new Vector2 (0f, jumpSpeed);

}

}

From the code fragment you posted, it is not possible to say where you set your animator bool “isJumping” back to false. You need to detect if the avatar has landed and set the value of “isJumping” to false to trigger the animation transition, and it seems this does not happen.

Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms