Character Movement Issue

I am having issues with my character’s jump and landing. Almost every time I jump, and land, the character will half jump and land again. Is there a way I can solve this problem? I am using the Animation Starter Pack. Thanks

Unfortunately, it’s hard to tell from your description. A wild guess: it could be that one or more of the transition animations are looping. Jump-start and jump-end should not loop.

If that isn’t the problem, can you describe more, show your code/blueprints, and/or provide a video of the problem?

How do I know if they are looping? Where can I find that?

Here is a link to a video to show you what I mean.

In your AnimBP, within the state machine. The jump-start and jump-end states have the animations inside. But if you don’t know that then the problem is probably something else. Still, most times those are set to loop and it’s not proper so it can’t hurt to check it in any case.

So I only found one and unchecked it, but still same problem.

Only one state for jump? Well, that’s not the problem. Show me the transition rules between Idle and Jump (double-click the two white circles with blackhorizontal arrows inside).

OK. This time, just click on the transition from Jump to Idle. In the details panel, scroll to the bottom. There are three settings under “Animation State”. In the one labeled “Left State Event”, enter the name FinishedJump. This creates a notification called “FinishedJump”. Now, go into the event graph of the anim BP and right-click. Enter the name “FinishedJump” and select the FinishedJump event. It will add an event node to the event graph. Drag off that execution pin and type “SetEnableJump” to create a set node. You want it to be false.

Now when the jump animation finishes, it will turn off the EnableJump bool and it won’t re-enter the jump state.

Oh, and if you’re turning EnableJump off anywhere else, don’t do that anymore. If you need to know the jump is complete in the character BP then you can create a function in that and call it from the FinishedJump event in the anim BP. Yeah, if you’re passing EnableJump into the animBP from the character then you want FinishedJump to call the character’s FinishhedJump function, where you would set the EnableJump in the character.

By the way, Character has built-in jump functionality. You can check out the third person template for an example. What I described is how to get events from the state machine to affect functionality. It will stop your repeated jump issue, but it’s also a little redundant given the existing jump mechanism.

Okay, so I did what you said and added the FinishedJump and added it into the AnimBP, but still same issue.

Yes, and the first person too, as well as most of the templates. I am using the Sidescroller Template, I wouldn’t assume to fix the templates Unreal provide. (meaning, why would they give us broken templates that we have to figure out how to fix on our own?)

  1. I wouldn’t combine my suggestion of using notifies with the existing Character jump functionality. I would do one or the other.
  2. Why all 3 notifies? You just need the one that gets triggered when the transition begins from Jump to Idle
  3. You don’t need the Jump notify
  4. What’s this “JumpButtonDown” variable?
  5. You are calling Jump from two places

Let’s get it to work without the Character Jump system. Then you can decide which way you want to go.

First, make sure the FinishedJump event is getting triggered. If the EnableJump bool is false and the animation isn’t looping then you shouldn’t see the second jump issue.

Okay, so how would i go about breaking this down to a more usable script? I don’t know why they add what they do, I usually don’t need to mess with their scripts. Thanks

I guess the problem is that the side-scroller template doesn’t have jump built in. You could start with the third person template and change the camera setup. BUt for the way you’re doing it now, you should remove the Character-Jump calls and add a PrintString to the FinishedJump event so you can see if it’s getting triggered.

Here is the Anim Graph In Whole.

Also, see what you can get out of this: Animation Blueprint Editor in Unreal Engine | Unreal Engine 5.2 Documentation

You want to be able to see what the animation state machine is doing while the game is running. Watch the state change as you do things with the character. When you jump, see if it’s going from Jump to Idle and back to Jump again.

Don’t do the CanJump Don’t set EnableJump in there at all. You’re setting it from the character BP on keypress. And as I said, get rid of the calls to Jump. Let’s do this your way first. Or, like I also said, if you want the existing jump functionality, then start with the third person template and modify it to get the side-scroller camera (and restrict movement to a plane). That’s probably easier than getting jump into the side-scroller template.

As I stated, I did not add or do any of this. This is factory in a sense. Only thing I changed or added was the Finished Jumping as you suggested. I understand I probably shouldn’t add it like it is, but I am new in this type of BP.

When I remove all the enable jumps, the player jumps without animation of jump.