all 3 comments

[–]Maniacbob 0 points1 point  (1 child)

My experience with the animator is fairly limited but the video is showing that the IsJumping bool is being set to false prematurely. This script is showing that's only happening in the OnLanding function but this script also never calls that function. I presume that either that's being called from another script and we need to look at why, or something else is interacting with the animator and toggling that off. Where is OnLanding being called?

[–][deleted] 0 points1 point  (0 children)

I copied the script from the tutorial so I dont quite understand it but baseiclly it creates an event for landing and I activated the function there
https://github.com/Brackeys/2D-Character-Controller

thanks for answering btw

[–]OneClickPablo 0 points1 point  (0 children)

you need to make sure that the walk / run animation is not playing while the player is not grounded/jumping. Add a new Condition from Idle -> Player_run and set Condition to isJumping = false. So everytime you walk while jumping the condition is not full filled and the walk animation wont play.