# Get sideways velocity?

**URL:** <https://forums.unrealengine.com/t/get-sideways-velocity/306287>\
**Category:** World Creation\
**Tags:** unreal-engine, velocity, question, Blueprint\
**Created:** [February 7, 2015, 9:41pm UTC](https://forums.unrealengine.com/t/get-sideways-velocity/306287 "2015-02-07T21:41:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [February 7, 2015, 9:41pm UTC](https://forums.unrealengine.com/t/get-sideways-velocity/306287/1 "2015-02-07T21:41:53Z")

</div>

Hi, I’m using the third person template. I have turned down ground friction so the character sides, but I don’t want it to slide sideways.

Is there any way to get sideways velocity as a float so I can plug it into Add Force like this:

 ![29333-01.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/9/a/19af00dcef0f809ca0bd975affeaa503a89db69f.jpeg)

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_17ec24a01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_17ec24a01](https://forums.unrealengine.com/u/anonymous_user_17ec24a01)\
**Post date:** [February 8, 2015, 3:02am UTC](https://forums.unrealengine.com/t/get-sideways-velocity/306287/2 "2015-02-08T03:02:48Z")

</div>

Here’s how you get it, I don’t know if you consider X or Y to be “sideways” but one of the pins should work for you.

 ![29356-velocity.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/3/3938be7a487fc82d27f02f2705170f1fb0d538d8.png)

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [February 8, 2015, 3:21am UTC](https://forums.unrealengine.com/t/get-sideways-velocity/306287/3 "2015-02-08T03:21:35Z")

</div>

Hi, Furroy. Thanks for your help. I think that gets world velocity, rather than local velocity. So X returns a value if I run N/S and Y returns E/W, instead of sideways drift.

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [February 8, 2015, 6:24am UTC](https://forums.unrealengine.com/t/get-sideways-velocity/306287/4 "2015-02-08T06:24:14Z")

</div>

You get the right vector and the velocity vector of the actor then calculate their dot product. It would give you the sideways velocity with positive values indicating speed to right and negatives indicating speed to left.

---

<div class="post-metadata">

**Author:** ![Snow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snow](https://forums.unrealengine.com/u/Snow)\
**Post date:** [February 8, 2015, 6:26pm UTC](https://forums.unrealengine.com/t/get-sideways-velocity/306287/5 "2015-02-08T18:26:30Z")

</div>

Yes! Thank you, that works great!

For anyone curious, this is for an in-line skating setup, but I’m sure it could be useful for something else:

MyCharacter blueprint:

 ![29390-cancel+out+sideways+drift+1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/c/1fcbd5089cf917dead6cd2325ff6940f188865ba.jpeg)

Character Defaults:

![29391-character+defaults+for+skating+game.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/a/66a7e5f307a2e772258f96bf53c1b5e268c74fc2.jpeg)

---

<div class="post-metadata">

**Author:** ![Theantibomb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Theantibomb](https://forums.unrealengine.com/u/Theantibomb)\
**Post date:** [April 5, 2024, 3:15am UTC](https://forums.unrealengine.com/t/get-sideways-velocity/306287/6 "2024-04-05T03:15:11Z")

</div>

Thank You!! Literally NO ONE anywhere could answer this simple question except you!
