# Clamping a turret rotation

**URL:** <https://forums.unrealengine.com/t/clamping-a-turret-rotation/776035>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [February 22, 2023, 4:42am UTC](https://forums.unrealengine.com/t/clamping-a-turret-rotation/776035 "2023-02-22T04:42:54Z")\
**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:** [February 22, 2023, 7:59am UTC](https://forums.unrealengine.com/t/clamping-a-turret-rotation/776035/2 "2023-02-22T07:59:59Z")

</div>

Have a look:

> [@Restrict Pawn's Rotation](https://forums.unrealengine.com/t/restrict-pawns-rotation/487856/3):
>
> Have a look at this one: Script to copy: [[Image from Gyazo]](https://gyazo.com/07facc8d174c94dd6103a641878c6929) Essentially, Dot Product is an answer to most angular issues. The yellow arrow indicates the turret’s front. Oh, and a TL is probably not the way to go about it unless you’re after something truly specific / unique / inflexible. Does not mesh well with target tracking in my head.

---

_[View the full topic](https://forums.unrealengine.com/t/clamping-a-turret-rotation/776035)._
