Announcement

Collapse
No announcement yet.

How to do the right thing Root motion montage? And another problem

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

    How to do the right thing Root motion montage? And another problem

    Good afternoon, everybody!
    I'm a beginner!
    I really want to make my own game.
    I'm facing a repulsive problem.
    I want to hit the enemy, and he flew away from the hit.
    I made a punch animation for the character and a fall animation for the enemy. I have a few problems.

    1.The first problem is that after the strike, the enemy takes three steps backwards as in the animation, but its capsule component remains in the same place, where he was standing. How do you fix it?

    Click image for larger version

Name:	2.jpg
Views:	36
Size:	91.5 KB
ID:	1684586


    Here is code Zombie animbp

    Click image for larger version  Name:	wsdasd.jpg Views:	0 Size:	315.0 KB ID:	1684557
    here is code ZombieBP
    Click image for larger version  Name:	www.jpg Views:	0 Size:	401.8 KB ID:	1684558
    here is bp character
    Click image for larger version  Name:	chbp1.jpg Views:	0 Size:	358.2 KB ID:	1684559Click image for larger version  Name:	chbp2.jpg Views:	0 Size:	309.6 KB ID:	1684560
    here is zombie animgraph
    Click image for larger version  Name:	angrh.jpg Views:	0 Size:	277.2 KB ID:	1684561
    2.The second problem is that the strike is not fixed once, but several times, because the collision hitbox on the leg touches the enemy's collision several times.

    3.The third problem I can't solve is how to make the hero hit the enemy and not miss if the enemy is in the strike zone?

    4.And my biggest problem is how to bite a zombie?
    I really want the enemy to be able to bite my hero like in resident evil. So that the zombie would grab the character and bite him, and the character couldn't escape for a few seconds?

    I would be very happy to hear from you for your support and advice. Thank you very much!

    (I attach high resolution files in reply post down)
    Attached Files
    Last edited by wwyn; 11-08-2019, 09:48 PM.

    #2

    Comment


      #3
      It could be

      The animation BP is not being told that you using root motion.
      The imported animation is not told that it's root motion based animation.
      The animation might not contain root motion animation but rather using the hips to translate the movement which will cause the player to move out of the capsule.

      If all things being true the capsule will glue it's self to the root and move along based on the animation applied to the root.
      Clarke's third law: Any sufficiently advanced technology is indistinguishable from magic.
      Custom Map Maker Discord
      https://discord.gg/t48GHkA
      Urban Terror https://www.urbanterror.info/home/

      Comment


        #4
        You should play your getting hit/die animations from a montage via a slot instead of directly inserting them into the state machine. You can take advantage of root motion while playing montages to move the capsule.

        Your animation will need to have root motion for this to work. I believe the default setting for montages will play root motion but you can check on that.
        UE4 Tutorials for 3rd person Blueprint project from scratch: Youtube Channel
        Use Blender 2.8 to make UE4 compatible animations: Blog

        Comment


          #5
          Probably because of the large number of pictures, you can't see my next questions.

          2.The second problem is that the strike is not fixed once, but several times, because the collision hitbox on the leg touches the enemy's collision several times.

          3.The third problem I can't solve is how to make the hero hit the enemy and not miss if the enemy is in the strike zone?

          4.And my biggest problem is how to bite a zombie?
          I really want the enemy to be able to bite my hero like in resident evil. So that the zombie would grab the character and bite him, and the character couldn't escape for a few seconds?

          I would be very happy to hear from you for your support and advice. Thank you very much!

          Comment


            #6
            Originally posted by Waves View Post
            You should play your getting hit/die animations from a montage via a slot instead of directly inserting them into the state machine. You can take advantage of root motion while playing montages to move the capsule.

            Your animation will need to have root motion for this to work. I believe the default setting for montages will play root motion but you can check on that.

            Did I get it right? Do I have Root motion in this animation?
            Do you have any example from YouTube in mind?

            Click image for larger version

Name:	rm.jpg
Views:	29
Size:	298.9 KB
ID:	1684668

            Comment


              #7
              Originally posted by FrankieV View Post
              It could be

              The animation BP is not being told that you using root motion.
              The imported animation is not told that it's root motion based animation.
              The animation might not contain root motion animation but rather using the hips to translate the movement which will cause the player to move out of the capsule.

              If all things being true the capsule will glue it's self to the root and move along based on the animation applied to the root.
              I would be glad if you could show me an example, on the forum or on YouTube, how it should be done correctly.
              All my animation from Mixamo

              Comment


                #8
                Well using Mixamo animations is your problem.

                read this

                https://forums.unrealengine.com/deve...gine-exporting

                The root of the problem is ,pun intended, is Mixamo animations do not contain the required root bone so that the animations are referencing ground.
                Clarke's third law: Any sufficiently advanced technology is indistinguishable from magic.
                Custom Map Maker Discord
                https://discord.gg/t48GHkA
                Urban Terror https://www.urbanterror.info/home/

                Comment


                  #9
                  Originally posted by wwyn View Post
                  Did I get it right? Do I have Root motion in this animation?
                  Do you have any example from YouTube in mind?
                  No that is not enough. For one thing AnimBlueprints have default setting to accept root motion from montages only. With your current AnimGraph you'd have to update that to accept root motion from everything in your AnimBlueprint class defaults.

                  But you don't really want to do that unless you are willing to deal with the added complexity of creating a root motion only controller. Playing hit/die animation should be run from montages as per defaults. Add a Slot node to your AnimGraph and move your hit animations to an external montage that you can then play on the slot as required while all locomotion animation remain where they are.

                  Check the docs on how to create a montage and play it with a slot in your AnimGraph.
                  UE4 Tutorials for 3rd person Blueprint project from scratch: Youtube Channel
                  Use Blender 2.8 to make UE4 compatible animations: Blog

                  Comment


                    #10
                    Originally posted by FrankieV View Post
                    Well using Mixamo animations is your problem.

                    read this

                    https://forums.unrealengine.com/deve...gine-exporting

                    The root of the problem is ,pun intended, is Mixamo animations do not contain the required root bone so that the animations are referencing ground.
                    I tried other animations, now root follows the zombies, but the capsule stays in place. Do you know why this is happening?


                    Comment


                      #11
                      Originally posted by Waves View Post

                      No that is not enough. For one thing AnimBlueprints have default setting to accept root motion from montages only. With your current AnimGraph you'd have to update that to accept root motion from everything in your AnimBlueprint class defaults.

                      But you don't really want to do that unless you are willing to deal with the added complexity of creating a root motion only controller. Playing hit/die animation should be run from montages as per defaults. Add a Slot node to your AnimGraph and move your hit animations to an external montage that you can then play on the slot as required while all locomotion animation remain where they are.

                      Check the docs on how to create a montage and play it with a slot in your AnimGraph.
                      I don't know how to do it all through anim montage. I've got four kinds of animation responses.
                      1. The zombies get hit from the front and take 3 steps back.
                      2. The zombies get hit from behind and make 3 steps forward.
                      3. The same to the left.
                      4. The same to the right.
                      Today I tried to figure out how to do it, sat for 8 hours and I failed.
                      I will be very grateful to you if you or someone else show me how to do it.

                      Comment


                        #12
                        Everyone has days like that especially when starting out. Here is a youtube video setting up a montage https://www.youtube.com/watchv=5DR7pxGouWE
                        This one has punch animations but the same principle will apply to hit animations.

                        It is really just 3 steps

                        - Build your montage by adding animations to it
                        - Name sections for each hit animation in your montage
                        - Play the montage when hit with the correct name
                        UE4 Tutorials for 3rd person Blueprint project from scratch: Youtube Channel
                        Use Blender 2.8 to make UE4 compatible animations: Blog

                        Comment

                        Working...
                        X