Announcement

Collapse
No announcement yet.

Character Stops Moving Instantly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Character Stops Moving Instantly

    Hello I'm newbie in UE4 and really unfamiliar with visual scripting and blueprints, I followed some basic tutorials to learn the fundemantals of it and try something advanced. But in the end i am just tangled with my scripting and can't move forward with my process. So I'm basically trying to do a character can walk in all directions which is easy. But in extra I want my character to sprint with a key pressed down and this is fine too. But when I stopped pressing that sprint key or stopped moving or pressing the opposite movement key while sprinting, character "instantly" stops moving which looks so unnatural for me. I looked up for many tutorials but they seem they are so fine with this effect and not seeing it as a problem. I don't want to be the guy that looking for the sraight answer but a similar tutorial, documentation, build etc would be better than nothing. Also I feel like very limited with the controls of blueprint but maybe it is just my amateurism. I already thank you for your support.

    #2
    I'm assuming that you already have the animation blueprint set up to take the speed and play appropriate animations for walking, sprinting, etc.

    When it comes to controlling the speed, you could use a Timeline and Lerp node to gradually increase your speed from walking to sprinting. The same system works in reverse when you release the sprint button.

    Click image for larger version

Name:	sprint.jpg
Views:	29
Size:	344.9 KB
ID:	1658964

    For the timeline, you could have a linear float curve that goes from 0.0 to 1.0 over a specified period of time. The lerp node will then take this value and output a result based on where it is in walk to sprint speed range.
    Tower Defense Starter Kit | Grid Creation Systems | Wave Spawning System

    Comment

    Working...
    X