Animation Jump stuck after pressed once



Here is my code and my result. The character jumps on space bar but gets stuck on the jump animation.
Is their something my code that am not seeing been stuck for 2 days on this issue.

Hi,

Welcome to our community! :slight_smile:

Please note, it’s better to copy/paste your code and apply the code fencing characters, rather than using screenshots. Screenshots are ideal for displaying specific details from within a game engine editor or even error messages, but for code, they tend to be less readable, especially on mobile devices which can require extensive zooming and scrolling.

You also prevent those that may offer to help you the ability to copy/paste part of your code back to you with suggestions and/or corrections, meaning that they would need to type a potentially lengthy response. You will often find that people are more likely to respond to your questions if you make it as easy as possible for them to do so.

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?

If so, did you check if the Jump animation state has got an Exit Time? Click on the white arrow pointing to the Idle state. Maybe you’ll have to set the “isJumping” bool to false at some point. You could also test the SetTrigger method with a trigger instead of a bool parameter in the Animator (see the Unity API/manual).

Hope this helps. :slight_smile:


See also:

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

Privacy & Terms