As the question says i do not know if the animation is stuck but my enemy AI seems to stay in idle while following me instead of the set up Idle_Walk_Run in blend, now in the images i show you can see the speed is 0, is their some way i can set it so once it sees me it can actually walk or run and not just idle follow is their some locomotion you can set up that can help me or?
At the bottom of your screen, press âEvent Graphâ under âGraphsâ. Can you take a screenshot of that graph for me? http://i.imgur.com/Dd64WCy.png
Animation graphs are made of two parts. One part, the part youâve filled out, defines what pose to use based on certain variables. The second part, the part you havenât filled out yet, sets these variables for use later.
What you are telling the game right now is: âChange this blendspace based on speedâ â but since speed is always the default value, nothing happens. Itâs easy enough to fix!
What we need to do is get the value âspeedâ from something. I think a setup like this should work for you:
What this does is every time the animation updates, it gets the movement component of your actor, fetches the velocity it has, and then takes the magnitude of that vector and sets speed equal to that. That should hopefully work for the basic character, but based on how youâve set up an actor this could vary.
That might be the fault of your animations. Check to make sure the blendspace you are playing is what you want. Find Idle_Walk_Run in the content browser and double click it.
the blend space looks fine, i checked to make sure if the walk and run was interrupting each other by removing run, but it still made no difference it just keeps dabbing.
Okay. I identified two problems with your blueprints, and managed to get it working on my end.
Firstly your animations do not loop correctly, because they are built to use root motion. Luckily, this is easy to fix in ue4. Simply check âforce root lockâ under âAnim Asset Detailsâ in both zombie_run and zombie_walk. This will cause the animation to stop skipping.
Secondly, the way you have your AI movement set up causes it to reset to zero speed every time it updates, causing hitching movement. In your AI blueprint, I managed to get the desired effect with the following nodes:
(You can leave off that print string, I was just using it for debugging.)
If you do both these things, your movement should work as desired. If this was helpful to you, please mark my answer as accepted so that we can close this question!