# How to limit mouse x and y or pitch and yaw of pawn look ?

**URL:** <https://forums.unrealengine.com/t/how-to-limit-mouse-x-and-y-or-pitch-and-yaw-of-pawn-look/1336338>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [October 18, 2023, 5:26am UTC](https://forums.unrealengine.com/t/how-to-limit-mouse-x-and-y-or-pitch-and-yaw-of-pawn-look/1336338 "2023-10-18T05:26:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VirusSlayer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VirusSlayer](https://forums.unrealengine.com/u/VirusSlayer)\
**Post date:** [October 18, 2023, 5:26am UTC](https://forums.unrealengine.com/t/how-to-limit-mouse-x-and-y-or-pitch-and-yaw-of-pawn-look/1336338/1 "2023-10-18T05:26:44Z")

</div>

![Untitled](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/1/18121ba15ed1b777f6478867795658eeeed01cc4.jpeg)  
I want to limit its movement in the mark area only  
 ![Animation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/4/b245d63add67c0491f46414716d80b0a8a435926.gif)  
Currently it can move freely, no limitation  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/7/347f2a5d7ac9a0039130e045a4d591533dc98d40.png)  
Code in the pawn  
I can move my turret pawn with basic add yaw and pitch.  
I can control the move sensitivity but how do i limit its movement like picture 1.  
For now the turret is on air soon it will be attached to side of my space ship. Star citizen turret can be a reference.

In this game, when player press G, he will possess this turret pawn with player controller as target. Not sure if i should create a custom control for the turret.

---

<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:** [October 18, 2023, 2:51pm UTC](https://forums.unrealengine.com/t/how-to-limit-mouse-x-and-y-or-pitch-and-yaw-of-pawn-look/1336338/2 "2023-10-18T14:51:33Z")

</div>

Look into how Camera Manager works. It does it out of the box.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/0/d00f0fd0d719a61ceeb8b298ed69558a5ff28063.png)

---

<div class="post-metadata">

**Author:** ![VirusSlayer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VirusSlayer](https://forums.unrealengine.com/u/VirusSlayer)\
**Post date:** [October 20, 2023, 5:00am UTC](https://forums.unrealengine.com/t/how-to-limit-mouse-x-and-y-or-pitch-and-yaw-of-pawn-look/1336338/4 "2023-10-20T05:00:38Z")

</div>

Do i need to add camera manager to turret or in player as well?

---

<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:** [October 20, 2023, 7:53am UTC](https://forums.unrealengine.com/t/how-to-limit-mouse-x-and-y-or-pitch-and-yaw-of-pawn-look/1336338/5 "2023-10-20T07:53:31Z")

</div>

Technically there is no need to add it - you already have a default camera manager. But you can add your own to the player controller - it’s often more convenient this way.

> [@¿How exactly works Player Camera Manager?](https://forums.unrealengine.com/t/how-exactly-works-player-camera-manager/459417/2):
>
> ¿How I enable it? You already have the default one. ¿How I edit it? You can access its basic functionality like so: ¿How I put it? You can override the existing default one by doing the following: right click in the Content Browser, select Blueprint Class and search for it (at the very bottom): assign the newly created Manager in the Player Controller [293798-annotation-2019-12-12-091258.png] …

Search arround the forums for more examples. YT has many tuts, a Google search will spit out too many answers, too.
