# Limiting rotation of component on moving actor

**URL:** <https://forums.unrealengine.com/t/limiting-rotation-of-component-on-moving-actor/2257492>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [January 3, 2025, 12:24pm UTC](https://forums.unrealengine.com/t/limiting-rotation-of-component-on-moving-actor/2257492 "2025-01-03T12:24:18Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [January 3, 2025, 12:55pm UTC](https://forums.unrealengine.com/t/limiting-rotation-of-component-on-moving-actor/2257492/3 "2025-01-03T12:55:35Z")

</div>

if you want to use `World Rotation` for the turret (which you should not, this is a job for `Relative Rotation`, but it can be made to work), the `Min` & `Max` should also be derived from the world rotation of the parent vehicle.

* * *

> this is a job for `Relative Rotation`

Here’s an example of angle locked relative rotation with transforms, derived from the `Look at Rotation` node:

> [@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/limiting-rotation-of-component-on-moving-actor/2257492)._
