# Angle between character rotation and moving direction

**URL:** <https://forums.unrealengine.com/t/angle-between-character-rotation-and-moving-direction/410465>\
**Category:** Blueprint\
**Tags:** rotation-direction, unreal-engine, Blueprint, question, CPP\
**Created:** [November 24, 2017, 9:44am UTC](https://forums.unrealengine.com/t/angle-between-character-rotation-and-moving-direction/410465 "2017-11-24T09:44:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2ed58531](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2ed58531](https://forums.unrealengine.com/u/anonymous_user_2ed58531)\
**Post date:** [November 24, 2017, 9:44am UTC](https://forums.unrealengine.com/t/angle-between-character-rotation-and-moving-direction/410465/1 "2017-11-24T09:44:16Z")

</div>

Hi all,  
I am programing some kind of combat system.

 ![221316-game.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/a/23acebd5626b39e7e1b891dba8464a83d2e6c409.jpeg)

My character (white) is facing RED direction (set through Mesh-\>SetWorldRotaion) and if I move him in BLUE direction, I would like to get Ω angle.  
This this angle will be used to get direction in blendspace to play correct animation of moving

 ![221317-blendspace.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/6/7/3676a65f6be9a67fd932b531d7998f4be1ad569f.jpeg)

I have tried to compute this directioun with forward vector/moving input and control rotation/mesh-\>world rotation (and several others) but always i get wrong output

---

<div class="post-metadata">

**Author:** ![Xelj](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xelj](https://forums.unrealengine.com/u/Xelj)\
**Post date:** [November 24, 2017, 3:38pm UTC](https://forums.unrealengine.com/t/angle-between-character-rotation-and-moving-direction/410465/2 "2017-11-24T15:38:54Z")

</div>

![221356-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/4/3b496e9a1e463628216c05800c45410db968e93b.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2ed58531](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2ed58531](https://forums.unrealengine.com/u/anonymous_user_2ed58531)\
**Post date:** [November 24, 2017, 5:02pm UTC](https://forums.unrealengine.com/t/angle-between-character-rotation-and-moving-direction/410465/3 "2017-11-24T17:02:34Z")

</div>

Thank you so much

---

<div class="post-metadata">

**Author:** ![AnotherZach](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AnotherZach](https://forums.unrealengine.com/u/AnotherZach)\
**Post date:** [November 15, 2018, 8:06pm UTC](https://forums.unrealengine.com/t/angle-between-character-rotation-and-moving-direction/410465/4 "2018-11-15T20:06:47Z")

</div>

Year later and this answer still useful! Thanks dude!

---

<div class="post-metadata">

**Author:** ![Kokuyouseki](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kokuyouseki](https://forums.unrealengine.com/u/Kokuyouseki)\
**Post date:** [August 19, 2019, 1:04pm UTC](https://forums.unrealengine.com/t/angle-between-character-rotation-and-moving-direction/410465/5 "2019-08-19T13:04:34Z")

</div>

Thank you for the solution - and btw also thanks for the question by OP, was easy enough to find it and it’s exactly what I was looking for 🙂
