# 4-27 Top Down Pawn Rotation

**URL:** <https://forums.unrealengine.com/t/4-27-top-down-pawn-rotation/506925>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 15, 2022, 6:29am UTC](https://forums.unrealengine.com/t/4-27-top-down-pawn-rotation/506925 "2022-03-15T06:29:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 15, 2022, 7:08am UTC](https://forums.unrealengine.com/t/4-27-top-down-pawn-rotation/506925/2 "2022-03-15T07:08:49Z")

</div>

Set the arrow’s rotation to absolute / world.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/d/b2d05772c7375caf8a5b5d528a9b2c8fb52414b3.png)

And then, instead of setting Relative Rotation:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/e/50e50d3e5eff7a729bafa0df0753bba7ef52bd3a.png)

Also, plug this one back in:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/1/af159f3057f2d8e1c849a7b1204e53dd1d29ae48.png)

Regarding restricting aiming angles:

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

Converting to degrees often complicates things unnecessarily but can be OK. Dot Product is your friend, though:

> [@How to create God of War targetting system?](https://forums.unrealengine.com/t/how-to-create-god-of-war-targetting-system/210302/2):
>
> [The Dot Product](https://en.wikipedia.org/wiki/Dot_product) of 2 directional vectors will be in range of -1 to 1. Anything that’s above 0 is in front of you, anything below 0 is behind (and every other value in between matters, too!) I grab all the actors around the player using a Sphere Overlap (as in the original suggestion) and loop through the elements of the array, checking my angles - Dot player’s forward and the direction to each target. For dot values greater than .5 I mark the target, and add that actor to the array…

Dot cheat sheet:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/f/0fb5f2965a3d87d95c427b167cc4c00f02d1cfdc.png)

---

_[View the full topic](https://forums.unrealengine.com/t/4-27-top-down-pawn-rotation/506925)._
