Run Stop/Skid Movement?

I’d like to create movement for when I’m running in my game and turn the opposite direction in certain games like mario etc you’d see movement/momentum conserved for a little bit in the direction you were going before turning around and moving the opposite direction.

I have the blueprints made to detect for it but I don’t know how to go about achieving the momentum conserving/pausing before continuing to move in the direction pressed.

Its kinda hard to convey what I want so here is a gif of the movement I’d like to achieve.

278336-runstop.gif

There are a few benefits if you are using the specialised UE4 Character which has a built in character movement component.

One key benefit is that walking movement mode (and other movement modes… like flying, falling) has built-in performance-efficient physics including inertia: with settings for Gravity, Mass, Acceleration, Ground friction, Braking friction, Braking deceleration and Friction multiplier (you set this in the component settings… I tagged them in blue in the photo below). There are also a few more if you’d like to get advanced like Maintain horizontal ground velocity and Braking sub step time.

As to the cute sliding and take-off animation in your GIF, I’d do something like blending this relative to acceleration/deceleration of the character. You might need to be a bit clever here to differentiate between situations where your character is running/stopping/sliding and walking/slowing down/stopping.

So the capsule would handle the movement and the animation would handle the look.

Just to mention, there is also a physics material, which adds bounciness and inertia to your character’s interaction with surfaces, which may also have physics materials (including the floor)… I think you add it to the root collision capsule. I haven’t used this much, so I’m not sure how physics materials interacts with the movement modes described above but there is training online.

Thanks! I was able to achieve it by using some anim notifys along with the friction variables.

this is great! your welcome!

btw… you might also consider using the character movement velocity and change (delta) velocity to differentiate between running/stopping/sliding and walking/slowing/down/stopping