[Solved] Sync character movement speed with animation speed

Hello there.
I’m playing around with third-person sample and experiencing some issues making smooth animations.
In animation blueprint of the said sample animation at speed of 90 looks smooth and nice, but character with MaxWalkingSpeed of 90 moves way too slow so it looks like the character is trying to moon-dance on ice. As i think setting MaxWalkingSpeed to something bigger than 90 but keeping blueprint’s variable at 90 will make a more pleasant look. The question is, how to set blueprint’s variable within ACharacter-derived class. I guess i might find solution in blueprints communication tutorial, but i also feel like there might be other solutions to this, so posting here. Thanks in advance!

Made that: AnimationSpeed = MovementSpeed - Constant, 30 in my case. Kinda achieved what i wanted, will have to increase MovementSpeed in code a bit though. Still looking for a way to change blueprint animation variables’ value within C++.
Edit: nope, didn’t work, because i used Blueprints plugin “Math expressions”, and here is a bug-report actually, editor crashes while trying to load AnimBlueprint asset containing math expressions provided via plugin as it’s not yet loaded.

#Set Anim BP Vars in C++

I have an entire tutorial about this for you!

With pictures!

Set Anim BP Vars in Code

PS: I like your name :slight_smile:

Thank you mate, will check asap :slight_smile:

Thanks once again mate, works fine. Blueprint got a lot more complicated just to make simple running animation. And the actual thing i had to do is change blendspace a bit.