# Getting direction of characters movement based on velocity?

**URL:** <https://forums.unrealengine.com/t/getting-direction-of-characters-movement-based-on-velocity/449831>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [May 30, 2019, 1:23am UTC](https://forums.unrealengine.com/t/getting-direction-of-characters-movement-based-on-velocity/449831 "2019-05-30T01:23:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheesyball232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cheesyball232](https://forums.unrealengine.com/u/cheesyball232)\
**Post date:** [May 30, 2019, 1:23am UTC](https://forums.unrealengine.com/t/getting-direction-of-characters-movement-based-on-velocity/449831/1 "2019-05-30T01:23:06Z")

</div>

Hello,

I am trying to set up a system in VR that allows a player to climb, then launch/propel themselves off of the climbing rock. Through a roundabout way (taking the actor location and subtracting it from the location the previous tick), I have managed to get the velocity of the moving part of the character. However, I still need to get a direction that the player will be launched in from the velocity of the player. E.g. if the player throws themselves to the right, they are further propelled to the right, up to up, etc.

How would I go about getting a vector that is facing toward where the player is being propelled?

Thanks!

---

<div class="post-metadata">

**Author:** ![DavidOConnor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/davidoconnor/32/978533_2.png) [@DavidOConnor](https://forums.unrealengine.com/u/DavidOConnor)\
**Post date:** [May 30, 2019, 1:59am UTC](https://forums.unrealengine.com/t/getting-direction-of-characters-movement-based-on-velocity/449831/2 "2019-05-30T01:59:57Z")

</div>

if I understand what you are asking… I think this is fairly straightforward…

You are using a player Character actor… right? From the **character movement component,** draw out **get velocity** , then **rotation from x vector** … this will give you the _direction_ as the world rotation of your characters velocity.

_PS._ if you’d like to get the _magnitude_ of velocity (speed) of your character just draw out **vector length**

_PPS._ you can do a similar thing with a **pawn** or even an **actor** , it’s just that **character** has it’s own special velocity check built in so it might be more performance efficient

 ![278364-character-velocity.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/4/3e4fe0a5125921dc94af886439b1ee25d939ca36.jpeg)

---

<div class="post-metadata">

**Author:** ![cheesyball232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cheesyball232](https://forums.unrealengine.com/u/cheesyball232)\
**Post date:** [May 30, 2019, 7:51pm UTC](https://forums.unrealengine.com/t/getting-direction-of-characters-movement-based-on-velocity/449831/3 "2019-05-30T19:51:15Z")

</div>

If I understand correctly, that would work on a character that is only rotating on 1 plane. Is there any way to get the vector in 2 dimensions? E.g. velocity moving left and up, or right and down.

Thanks.

---

<div class="post-metadata">

**Author:** ![DavidOConnor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/davidoconnor/32/978533_2.png) [@DavidOConnor](https://forums.unrealengine.com/u/DavidOConnor)\
**Post date:** [May 31, 2019, 1:47am UTC](https://forums.unrealengine.com/t/getting-direction-of-characters-movement-based-on-velocity/449831/4 "2019-05-31T01:47:21Z")

</div>

Ok… so the above will give you the total velocity speed and rotation of the character in 3d… in world space.

You can also get the forward/backwards, up/down and left/right velocity speed… relative to the direction the character is facing… is this what you are looking for?

PS. props to @anonymous_user_07b2b30b for perhaps a more efficient/elegant solution than my original one…

 ![278480-velocity2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/9/e199332b91c4b78093a5f6c1b193e6f74a6823ce.jpeg)
