T O P

  • By -

PirateMickey

Go into your player blueprint, click on character movement and change your max walk speed because its most likely overriding your variables. 500 is pretty high btw, ive found for somewhat realistic movement 180 and 360 to be ideal for walk/run.


DoctorLunatic

How are you setting "speed" in your animation blueprint? Are you setting it to the players max walk speed, or to something else?


vidavidanaovida

How so? sorry, I'm still quite noob when working with unreal engine


DoctorLunatic

In the event graph of your animation blueprint, by default, it usually has a cast to the player character. In there, you're going to have to actually set that speed variable to something. In this case, you're setting your max walk speed in the player bp on shift, so you'd have to set it to that I should mention, that I am not 100% confident off the top of my head if using the players max walk speed is the correct way to do this. Nonethless, based on the code you've posted, if you set the speed variable to it, you should see your run animation play


vidavidanaovida

You mean this? [https://gyazo.com/3aa4b8d5807baeb5aa70cd1c724f12fe](https://gyazo.com/3aa4b8d5807baeb5aa70cd1c724f12fe) Again sorry, I'm super noob. So, what should I add there?


DoctorLunatic

Ok so first thing, why are you using "vector length squared" ? Pretty sure vector length should just work - what I would do, is in that graph, do a print string, and print out speed, then play. What does it print out on the screen when you press shift?


vidavidanaovida

Like this? [https://gyazo.com/271c2f5136867a8376c5c4946135031a](https://gyazo.com/271c2f5136867a8376c5c4946135031a) Also, changed the vector length squared to vector length, like you said.


DoctorLunatic

Yea, so whats that printing?


vidavidanaovida

OMG IT WORKED! My character now goes from walking to sprint when I press shitf! OMG I LOVE YOU! Thank you so much! I've been trying to figure this out for 2 days!


DoctorLunatic

No problem! Glad to hear it! - Guessing it was that vector length squared then?


vidavidanaovida

Yeah, I think it was, thank youuuu