I’m having difficulty getting an idle and a walk animation to blend nicely together. I have a 1d blendspace setup with idle at 0 speed and walk at 250. Shown here:
I use this blendspace in my animgraph’s locomotion state machine. Shown here:
The Moving state:
The problem shows in game when the character stops, he snaps to the idle, rather than blends to idle. I am telling the character to move using “Move to Location”. I don’t want to have to put some extra logic in there to slow him down before he reaches his target just to feed the blendspace some intermediate numbers.
I know a better result is possible, because if I replace my character with the blueman asset using pretty much the identical setup in terms of blendspace and locomotion statemachine, the blueman looks great when coming to a stop.
I can simulate the bad ingame experience in the blendspace editor. I bring the ball in the graph to the top speed, so he’s at full walk speed. Then slide the mouse up away from the graph and then circle down below the graph (without touching it so the speed stays at full), I can then snap the speed to 0 by moving the mouse up into the graph at zero speed. For the blueman, it blends nicely. For my character, it snaps.
What secret sauce is in the blueman to allow this nice blending?
Hi this isn’t blending problem, this is caused by ‘Speed’ parameter, If pawn reached destination this is obvious that Speed will be set instantly to 0, but there is solution:
Find your character movement component
Tweak Ground Friction parameter, in my case 2.f is good
Tweak Breaking Deceleration Walking, in my case 1.f is good;0
Thanks for the help. Unfortunately, this didn’t seem to work for me. I even tried 0 for both ground friction and braking, but it didn’t seem to change anything. Also, using the exact same original character movement settings for blueman versus my anims gives very different blended results. To be clear though, my walk animation is more exaggerated than blueman’s. My walk anim is more of a sneak with the back leaning forward. But I just don’t see a blend happening between the upright idle and the sneak. If you try my trick with the Blendspace using blueman to get the parameter to snap to 0, you can see how there is an actual blend to whatever you put into the two animations. The anims will not snap.
Maybe I have another setting off somewhere, but it doesn’t look like braking and friction alone will do it.
All you need to do is add another variable into your anim graph, call it SpeedLERP or something (as a float). Then on your update tick, after you’ve updated speed, LERP SpeedLERP from SpeedLERP to Speed. Use delta time multiplied by some constant as your alpha. Then in your blendspace plug this SpeedLERP variable in instead of your Speed variable.
I’m going to go ahead and accept this answer, but only because it worked Thanks for the suggestion…
What I’m hoping for though is someone to explain why the blueman blends so well in any blendspace situation without this extra lerping of the control parameter. If I could understand that, then I wouldn’t need all of these lerp controls which could be animation dependent.
I’m removing the “accepted answer” because I came across some more data that leads me to believe there’s an actual content solution.
Just like the blueman, I noticed the character in Couch Knights also blends to a very smooth idle if I use the BlendSpace editor to snap its speed to 0. The BlendSpace editor doesn’t use the SpeedLerp from an animgraph. The Couch Knight character’s animgraph doesn’t even do any additional speed lerp, I guess since it’s working just fine with the animations alone. I would like to avoid the extra lerping because it does introduce some amount of skating.
I am hopeful that someone from Epic can help point out the magic that needs to happen. My animator and I can’t seem to figure it out.
The Blue Man’s secret sauce is in the Target Weight Interpolation Speed variable in the Anim Asset Details panel of your BlendSpace.
-.
PS - The yellow “reset to default” arrow is one of the better indicators that we are doing something other than the vanilla settings. Always good to keep an eye out for that when looking at our example assets.
For movements i put idle/walk/jog/run in one blend space. and animations can be made to start at the position ur switching to. for example make a character start at the idle anim then him leaning into sneaking. (inside the 3d software your using) then make another blend space for the sneaking anims. For anims like jumping. you can use <= Ratio it seems fairly smooth to me. but forgive me if it doesn’t help you :<
“Target Weight Interpolation Speed variable in the Anim Asset Details panel of your BlendSpace.”
This worked for me. It was defaulted to 0 in a new Blend Space. I tried values from 1 to 100. 1 made the character slide across the ground. 2 was better but still slow. Between 5 and 10 seemed to be the sweet spot for me. Anything above 20, up to 100 seemed to get back to that jerky motion when snapping back to idle.
This worked well for me also with values in the 5 to 10 range. This is much simpler than adjusting the max walk speed as the character approaches a destination, and it looks more natural in my opinion. Thank you +1