Strafing backwards movement stuttering/jittering fix - Unreal Engine 4 *Outdated, check description*
Edit 4: Video for the new method is up, please read the description of that video before using the new method! • Unreal Engine 4 - Third person locomo...
Edit 3: I personally don't use this method anymore, I have no time to post a tutorial right now, but what I do now is use an enumeration with different direction names, I assign the enumeration in the character blueprint (like this https://imgur.com/HV1PysX) then I put my movement animations in my animation blueprint and cache them, then I blend the different movement directions by enumeration in my animation blueprint (like this https://imgur.com/GD7ov89) this gives me perfect results. Blend by enumeration is really powerful, you can mix things up, and you can use speed for different animations at different pace.
Edit 2: As
Николай Лебедев pointed out in the comments, this could be fixed with using "weight interpolation per bone". I'm using a different method for animation right now but don't have time to post a new tutorial :/
Edit: As the comments already said, don't divide by zero when you get to setting the Blend Space Direction at 03:20, instead just set the new value to 0 directly.
Hello all, I'm kinda new at Unreal Engine and inexperienced at programming so not sure if this is the correct way to fix this or if it will cause problems further down the line but it works for me. Links and problem description bellow.
Link to how to get the direction and speed calculated (starts at 08:25), video made by PyroDev (ty man great vids): • Unreal Engine 4 - Blendspaces/Movemen...
If after finishing this video you have a problem with diagonal movement triggering too early it could be due to the way the direction is calculated. Solution to this could be following this tutorial by Filmstorm (thanks man also great vids) but just using the way he calculates the direction inside the Character blueprint ( you don't have to use the root motion stuff) then feed that direction into the animation Blueprint:
• Setup Root Motion System with Input R...
Another way to solve it by Basement Bob on the unreal forums:
https://forums.unrealengine.com/development-discussion/animation/1703522-my-character-doesn-t-calculate-the-backward-direction-correctly
And a kinda related article by Joakim Hagdahl that might be of help:
https://rockhamstercode.tumblr.com/post/174482327268/strafing-locomotion?fbclid=IwAR3bYAI2PAcpV5bfykFkILVfneThbhHLiXiWg0gCoT8pXBDPNGG_m15lrYo
Anyway, this problem only occurs if the interpolation time is set above 0. So quickest fix would be setting the interpolation time to 0 but your animation quality would suffer.
To fix this and keep a single blendspace, what you need to do is have the backwards movement animation on direction 0 because the problem occurs when the movement is on -180 or 180 and the blendspace switches between them rapidly. You also need to have negative speed so you can distinguish between forwards and backwards movement.
Once you get your usual direction and speed inside your animation blueprint, you need to run a branch with a condition of two InRange(float) that's going to check if your movement is either around 180 or -180, make a new Direction variable and once the range check is true then set the new direction to be the old one divided by 0. If it's false it should remain as the old direction.
For the speed simply run another branch and one InRange(Float) that's going to check if your direction of movement is between -100 or 100, if that's true it means you are moving forwards so set your speed to be the same as the vector length. If it's false means you are moving backwards so your speed should be multiplied by -1.
Then in the end feed the new direction in the blendspace that's in your state machine. And for the transition rules just use a speed check.
Other Videos By M
2021-07-20 | M&B Full Battle Events 3 Part 1 - Wild west gunfights |
2021-07-20 | Big Jedi charge |
2021-07-18 | M&B Full Battle Events 2 |
2021-06-27 | Native training match |
2021-05-29 | Men of Borr fend off a cavalry attack on a wagon |
2021-04-18 | M&B Full Battle Events 1 - Native |
2020-10-02 | Gothic II - Seekers teamkill each other on Sekob's farm |
2020-05-19 | Vikingr mountain bridge clash |
2020-05-19 | Mount & Blade: Warband - Vikingr battle event 1 |
2020-05-05 | How to use Pretty Fantasy style for Azgaar's Fantasy Map Generator |
2020-01-08 | Strafing backwards movement stuttering/jittering fix - Unreal Engine 4 *Outdated, check description* |
2019-09-14 | Doggo sneak attacks cat |