# Is there a way to get rotation direction?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [March 2, 2026, 12:23pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185 "2026-03-02T12:23:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mastatatoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mastatatoe/32/1152947_2.png) [@Mastatatoe](https://forums.unrealengine.com/u/Mastatatoe)\
**Post date:** [March 2, 2026, 12:23pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185/1 "2026-03-02T12:23:13Z")

</div>

I have been searching online and weirdly I can’t find anyone talking about this? It seems like it should be simple but I really can’t figure out how to detect if the player is rotating Clockwise or Counter-clockwise.  
For reference, my game has tank controls (its a retro-like survival horro game) and I want different animations to play if you’re rotating left or right

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [March 2, 2026, 5:20pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185/2 "2026-03-02T17:20:23Z")

</div>

Hello Mastatatoe,

Interesting problem, I first wondered if dot product could be used (comparing previous vector to new vector) - But that only returns a positive number until you are past a 90 degree threshold with the previous vector. (So for example if you look 45 degrees to the right or left that will return the same positive number)

I then thought - 'Why not just compare the current yaw with previous yaw to see which direction the rotation happened in?" this works ok, up until a hiccup on the threshold between +180 and -180.

 ![Screenshot 2026-03-02 120844](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/a/77ac7521d560a67e5974f87d1128bc85d34352ff.png)

Then I found the ‘Delta (Rotator)’ node - and the hiccup was solved:

 ![Screenshot 2026-03-02 121717](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/e/5fedb5c9e409ba8b5bfd66eca23f573defc006bf.png)

This is a very ‘raw’ way to get rotation direction, In the context of animation some other paths might be basing it on player input actions, also there’s probably something built into the animation system to help with this. (something something blend spaces?)

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [March 3, 2026, 8:33am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185/3 "2026-03-03T08:33:38Z")

</div>

Hello there 🙂

There are 2 ways I can think of:

1. Very simple - get the input. Pushing the “Turn Left” button? Oh well…
2. Record the last tick forward direction (prev). Cross product with the current forward vector (cur) gives you a vector that is perpendicular to both. Now you only have to see if it is pointing up or down. You can only compute the Z of the cross product and check if it is positive or negative.  
`flaot crossZ = cur.x * prev.y - cur.y * prev.x`

(the Z optimization is only possible if you are sure you are turning horizontally)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/8/d28d596c7b3c6b27d7389ad65adbf244abf525db.jpeg)

---

<div class="post-metadata">

**Author:** ![xx\_pooya\_xx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xx\_pooya\_xx](https://forums.unrealengine.com/u/xx_pooya_xx)\
**Post date:** [March 3, 2026, 9:11am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185/4 "2026-03-03T09:11:57Z")

</div>

If it is the player you can just check the axis of your input (which is a float) and check the sign. (Sign Node or check if negative)

If it is for anything else, it requires a _Previous Forward_ value that you can check with.

what I would do instead if you are using the second method, I would store a PreviousForward Vector of the actor or character. (you can make it planar by making a Vector of X and Y only and ignore Z for Yaw only). Then use _Find Look At Rotation._

The setup should look like this (Make sure to store the PreviousForward in BeginPlay)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/c/8acc23db1c57d41531f4c0030543666c6c1a49a2.png)

I also recommend you not using the last method if it is solely the player input related since it is gonna be ticking every frame on the game thread. For player it only is one object that is calling this. But for NPCs and etc, I would not advise you doing it. I would just use the input checks for player, and for AI I would just check if the direction of _Me to player_ with _Direction of my current forward_ once and would store it to rotate. (same setup as above almost)

But if it is something like the player camera or anything that needs this really or something that is only there 1 time in your level, the solution works perfect (and add the condition for checking 0 if you want it as well)

---

<div class="post-metadata">

**Author:** ![Mastatatoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mastatatoe/32/1152947_2.png) [@Mastatatoe](https://forums.unrealengine.com/u/Mastatatoe)\
**Post date:** [March 4, 2026, 12:29pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185/5 "2026-03-04T12:29:45Z")

</div>

thank you so much this worked perfectly mixed with some booleans and calling it in an animation blueprint + state machines.  
this issue was really crushing my balls, really smashing them slowly with a hammer, truly putting them in a hydraulic press!

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [March 4, 2026, 4:21pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-rotation-direction/2703185/6 "2026-03-04T16:21:12Z")

</div>

Glad to hear you got it working! There’s probably some more appropriate idioms to use - like “I was really banging my head against the keyboard here” 😆 🤕

I’ll concede that I like the solution that @dZh0 provided better. I was on the right track with using vector math, and should have realized that cross product would have done the trick instead of dot product. It’s also more elegant in the fact that it uses only 1 variable instead of 2 and has built-in checking to prevent it running more often then it needs to (!= node)
