Announcement

Collapse
No announcement yet.

start jump and end jump animations keeps looping after transition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    start jump and end jump animations keeps looping after transition

    Hi,
    I'm working on a simple character and I have run/idle and jump animations.
    I have a idle>jumpstart>jumploop>jumpend>idle setup in the animation blueprint similar to the character video tutorials.
    When I press jump, the animation will loop the jumpstart animation a few times before it will go into the jump loop.
    And the same happens when going from the jumpend animation into the idle animation.
    I set animation time remaining ration < 0.1 And when I set it to 0.4 the looping does happen a lot less, but I cutoff the animation almost by half.
    I also tried setting the blend duration to 0, but it will only help a little bit.
    My jumpstart and jumpend animations are fairly short and when I make them longer the looping of the animation also will happen less.
    Is there something I am doing wrong or is there a way, to make the jumpstart animation finish only once, before going to the jumploop animation?
    thanks,
    Arjan

    #2
    You should click off the loop checkbox for jump start and jump end to prevent them from looping. Anyways, maybe you should consider adapting to the montage jump approach which has far better results!!


    Click image for larger version

Name:	JumpMontage2.png
Views:	1
Size:	363.2 KB
ID:	1067085
    So why switch to a montage instead of the state manager? Well because you have more control, you can have a multitude of jump types and jump attack types and you can forget having to use the time remaining ratio node.\\

    So basically what is happening is you have your jump up animation that triggers either a jump command on the player or switches the mode to flying to allow z translations to occur on root motion animations. This jump animation should feed directly into the jump fall animation. As soon as you reach this point of the jump you can turn on gravity. By playing the anim montage on the character instead of the animation blueprint the animation montage will blend correctly between different animation types. If played inside the animation blueprint your animation montage sections will switch instantly ... just a note.




    Here is what happens when a jump is initialized. It'll determine if we can jump and call the animation to play... that's it.
    Click image for larger version

Name:	jump1.png
Views:	1
Size:	100.8 KB
ID:	1067086



    The actual start of translation upwards should be specifically placed on your animation instead of using time remaining ratio. This is done with a branching point on the animation montage which you can see above labeled 'Flying'. Not sure if they fixed this bug yet but you have to restart UE4 after creating your branching points in order for them to show up. So, your branching points are accessible in the animation blueprint, but you need to use the montage play function within the character blueprint in order to utilize smooth transitions.


    Well these easy to setup branching points are all you need in order to send a message to your character object that you want to do something.
    Click image for larger version

Name:	branchingpoints.png
Views:	1
Size:	101.8 KB
ID:	1067089

    Here from the character class we will handle either a root motion jump or standard jump command on the character.
    Click image for larger version

Name:	flying.png
Views:	1
Size:	117.0 KB
ID:	1067088

    This jump falling animation will loop continuously until you tell the montage to jump to a new section. This is triggered from the tick() function which will check if the character is grounded and if so, then jump to the new montage section.


    Click image for larger version

Name:	jumpland.png
Views:	1
Size:	84.1 KB
ID:	1067091

    Now, this is only an option as you may prefer to use the state manager. And you may find a way to fix the issue with the blending, it's going to take some time customizing and then you're going to have to do it again and again to get each jump animation looking good on each character and then your previous jump settings are going to be all screwed up. So anyways you get the idea.

    Comment


      #3
      Click on the JumpStart animation node, in the Settings panel untick 'Loop Animation'. Do the same for JumpEnd node and leave it on for the loop node. That should fix your problem.
      UE4 Tutorials for 3rd person Blueprint project from scratch: Youtube Channel
      Use Blender 2.8 to make UE4 compatible animations: Blog

      Comment


        #4
        Thanks Garner, for the detailed explanation, I am going to look into the montage approach.
        I feel silly to ask, but where can I find this "loop animation" option? I looked everywhere, but I can only find the details of the animation clip, when I double click on the animation.
        And I can't find this option in the details panel.
        Click image for larger version

Name:	animation_details.jpg
Views:	1
Size:	151.1 KB
ID:	1067103

        Comment


          #5
          Click image for larger version

Name:	where-is-loop.png
Views:	1
Size:	75.8 KB
ID:	1067106
          It's within the state engine for the animation that's being fed into the pose.

          Comment


            #6
            Thanks!, it works now.

            Comment


              #7
              Ty this was Exactly what i was looking for as well

              Comment


                #8
                I'm having this problem where when I jump the jump start animation just keeps going and doesn't go to the jump loo. I added a different JumpLoop but it keeps looping the jump start.
                Last edited by Jacob493; 04-20-2020, 12:53 PM.

                Comment

                Working...
                X