No announcement yet.

Help blending RootMotion dodge with PhysicsCapsule driven locomotion!

  • Filter
  • Time
  • Show
Clear All
new posts

    Help blending RootMotion dodge with PhysicsCapsule driven locomotion!


    I've set up a character who can run around and jump using a regular input driven Capsule Physics to drive movement (CharacterMovement component).
    For a dodge I've made an animation which moves the character (and the capsule of course...) using RootMotion.

    It triggers and moves the character fine, but it doesn't blend very nicely between the Physics and the RootMotion driven systems. Especially when blending out of the dodge (RootMotion driven) animation, it seems like the input driven Physics doesn't start affecting the character's movement until the RootMotion animation is entirely blended out. This makes it so that every time I exit the dodge animation my character loses all momentum before going into my default input driven locomotion, which isn't exactly what I want when blending out of the dodge and giving directional input. So even though I've held Input Fwd and my Sprint button, the character has to accelerate from 0 speed.

    I'm fairly new to Unreal so I'm sure I'm doing something wrong. Any help is much appreciated!

    Attaching some info about my setup. I understand another way of setting up RootMotion animations is through AnimationMontages. Would that solve my problem?


    I tried hooking it up with an AnimMontage now. I seem to have managed to blend that much nicer with the regular movement! Wohoo!

    What I haven't been able to figure out, though, is how to control the blend of this new setup.

    I guess more info of my setup is required for anyone to help answer this?



      OK so I read the OP through a few times and I have to be honest I don't have an understanding of your understanding of how things should work when using root motion as a replacement for in-place animation and how far down the rabbit hole I need to go as to the fundamental differences between the two as to a good guess as to the problems you experiencing. How I like to put it comparing the two is like comparing bananas to banana boats with a loose reference to a fruit.

      in-place animation is reactive animation meaning that it can only react to state changes like a puppet in a box after a trigger has been applied.

      Root motion on the other hand contains the necessary translation and rotation data to move the player through 3dspace with out the additional assistance of the banana boat in the form of the movement component. For that matter the MC is glued to the root of the character and in most cases is ignored as the primary means of moving the character. More or less once told to use RM the animation only needs a trigger and the player will move as to the transforms place on the root. Once the cycle is completed the action simply cycles at the last position of the root so based on the bit of information we could assume an answer as to the problems as to blending out of a state with in a state machine is caused by the exit argument usually required by the use of a state machine

      The most common exit argument is usually based on the percentage left in the animation so that proper blending can occur so if this is the case, and the player is in the current state the animation will continue to cycle until the exit state is generated. This is different from using in-place as once again the animation is only reacting to the movement component which moves independent

      Long way of saying that root motion and state machines do not work well together as once again the difference between event and reactive animations being used under less than ideal conditions or configurations.

      Why the animation montage works better is simply because a montage has it's own ease in and ease out values so by default it blends a lot more cleanly no mater where it is blending into and out of the current state.

      What you might what to consider using with root motion is a animation tree instead of a state machine as in most case there is no need for an argument to exit a state and with things like motion matching or grouping, more so when it comes to locomotion, there is no real need for a state machine at all.

      Here is a response I made that might be useful information.

      Hope this helps?

      Clarke's third law: Any sufficiently advanced technology is indistinguishable from magic.
      Custom Map Maker Discord
      Urban Terror