How to have instant acceleration/deceleration for character

Here’s one way to do it. So this will replace the default input for forward backwards movement. When the axis value is 1 aka moving forward we set the velocity in that direction to 5000 m/s. If it is -1 aka backwards we set it to 5000 m/s backwards. If the axis value is 0 aka standing still we set it to 0.
If you want this for the left and right axis you just repeat this for that input. As axis values are updated every tick this should be the most responsive way to acheive this.

Things to notice!
The set velocity functions also sets the velocity in the z-direction to 0 in this setup. If you want gravity you should spilt the vector input in the set velocity node and input the z-velocity from the get velocity node (also taken from the character movement component). You split a node by right clicking a vector node a pressing “split strcut pin”.

Another thing to notice if you want movement forward, backward, left and right is the interaction between moving forward and right at the same time for example. The velocities should be multiplied by cos(45) since this will keep the velocity at 5000 m/s at all times.

Tell me if you have any questions :slight_smile:

2 Likes