# Sliding after running

**URL:** <https://forums.unrealengine.com/t/sliding-after-running/310350>\
**Category:** Blueprint\
**Tags:** slide, sliding, unreal-engine, UE4, Blueprint, question\
**Created:** [March 10, 2015, 6:40pm UTC](https://forums.unrealengine.com/t/sliding-after-running/310350 "2015-03-10T18:40:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lumoblaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lumoblaze](https://forums.unrealengine.com/u/lumoblaze)\
**Post date:** [March 10, 2015, 6:40pm UTC](https://forums.unrealengine.com/t/sliding-after-running/310350/1 "2015-03-10T18:40:15Z")

</div>

Hey all! I’ve been doing some work in a bit of a video game doodle.

I’ve got my character sprinting, crouching, jumping, however I can’t seem to make it when you go from a jog or sprint to a crouch, you slide to the lower max speed.

I’ve tried to use fInterp to, fInterp ease in out, tried lerp, it didn’t work,

[http://puu.sh/guJea/c33f7d7f9f.jpg](http://puu.sh/guJea/c33f7d7f9f.jpg)

The intent is to add a long jump if you jump while sliding.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![godbloc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@godbloc](https://forums.unrealengine.com/u/godbloc)\
**Post date:** [March 2, 2017, 12:13am UTC](https://forums.unrealengine.com/t/sliding-after-running/310350/2 "2017-03-02T00:13:04Z")

</div>

Your [velocity alpha] multiply by zero.  
If you want to slow down speed when crouch , it simplest way is set maxspeed by  
Then you must use a variable like “brake” with value less than one then multiply with the current velocity to prevent long jump  
I use Pseudocode for

> Blockquote

Example :  
// define brake variable 0-1

- List item

[range 0 1] Float brake = 0.9;  
If ( key down to Crouch) then SetMaxSpeed to new value ;  
Else SetMaxSpeed to normal value ;  
While (tick) do  
{  
If ( checkInAir () ) then Velocity \*= brake (is the air factor to redure speed)  
}

> Blockquote
