# How to set max and min yaw for camera/player rotation

**URL:** <https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341>\
**Category:** Cinematics & Media\
**Tags:** rotator, unreal-engine, question\
**Created:** [April 8, 2015, 7:08pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341 "2015-04-08T19:08:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d1c0a6e61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d1c0a6e61](https://forums.unrealengine.com/u/anonymous_user_d1c0a6e61)\
**Post date:** [April 8, 2015, 7:08pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/1 "2015-04-08T19:08:31Z")

</div>

Hey,  
I’m looking for way to compare player contol rotation with my custom rotator value.  
I’m trying to set max and min yaw camera value in my game (static turret)

---

<div class="post-metadata">

**Author:** ![Ockertvs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ockertvs](https://forums.unrealengine.com/u/Ockertvs)\
**Post date:** [April 8, 2015, 8:34pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/2 "2015-04-08T20:34:11Z")

</div>

There are a few ways to limit Camera or Player rotation.

In Blueprints , you can make use of the Camera Manager:

 ![38064-screen_1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/4/d948e2b440f2aa6d3a303cfe03d0cb41d1634bed.jpeg)

Another way would be to create a custom “Camera Manager” Class : Easy way(Open the Player Controller , and create one under Defaults)

 ![38065-screen_2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/5/2d56c2b061ec75dfb85b5a3e4ab7d4cf763f75c2.jpeg)

And under the Defaults of the new created Camera Manager Class , you have access to the rotation limits.

 ![38066-screen_3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/6/886723f97f45eaecd6ceb622f988582f6f4e042a.jpeg)

Ockert.

---

<div class="post-metadata">

**Author:** ![AJ\_Graphix](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aj_graphix/32/1194669_2.png) [@AJ\_Graphix](https://forums.unrealengine.com/u/AJ_Graphix)\
**Post date:** [November 14, 2016, 11:46pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/3 "2016-11-14T23:46:10Z")

</div>

Thanks so much, Ockertvs! Your solution worked perfectly. I really appreciate you taking the time to answer the poster’s question as it has helped others, too! 🙂

---

<div class="post-metadata">

**Author:** ![CharlyB.Goode](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CharlyB.Goode](https://forums.unrealengine.com/u/CharlyB.Goode)\
**Post date:** [January 21, 2018, 6:07pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/4 "2018-01-21T18:07:35Z")

</div>

Hello

I d like to set my yaw depending of the character forward vector and not world rotation.

It s a FPS and i m doing a climbing feature so i want to lock my yaw but the camera manager set it depending to the world.

I can t find anything about it on google…

Thanks

---

<div class="post-metadata">

**Author:** ![Inofarr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Inofarr](https://forums.unrealengine.com/u/Inofarr)\
**Post date:** [June 11, 2018, 10:33pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/5 "2018-06-11T22:33:48Z")

</div>

hey, I’m totally new to EU and I’m doing an FPS with a climbing feature too !  
so I did this with a lot of research, and it works pretty well.

 ![243936-captureue.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/4/f741dc8a3c30ac191358490ef0d473eeaf57a462.png)

ps : the link to the left comes from envent tick

I hope I was helpful 😃

---

<div class="post-metadata">

**Author:** ![HornokTibor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HornokTibor](https://forums.unrealengine.com/u/HornokTibor)\
**Post date:** [May 15, 2019, 6:10pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/6 "2019-05-15T18:10:03Z")

</div>

I solved it, if u needs help, message me!

---

<div class="post-metadata">

**Author:** ![AquilaNera9211](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AquilaNera9211](https://forums.unrealengine.com/u/AquilaNera9211)\
**Post date:** [October 12, 2022, 8:19am UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/7 "2022-10-12T08:19:15Z")

</div>

For anyone looking into this, another solution could be setting dynamically the min and max yaw inside the player camera manager.

- Create a custom Player Camera Manager

- Get a refence to the character on the begin play (no need to cast to a specific character)  

- In the **tick event** of the camera manager get the actor rotation and set **View Yaw Min** and **View Yaw Max** subtracted or added with you’re value, in the example the Yaw is limited to 90 degrees to the left and 90 degrees to the right from the current rotation of the character.

---

<div class="post-metadata">

**Author:** ![9robin3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@9robin3](https://forums.unrealengine.com/u/9robin3)\
**Post date:** [November 19, 2022, 10:28am UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/9 "2022-11-19T10:28:42Z")

</div>

This doest work for me, depending on how my climbing thing is rotated the camera will be facing either up or towards the climbing thing ☹

---

<div class="post-metadata">

**Author:** ![guigfreitas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@guigfreitas](https://forums.unrealengine.com/u/guigfreitas)\
**Post date:** [October 11, 2023, 2:18am UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/10 "2023-10-11T02:18:27Z")

</div>

This helped me out so much! I wanted to limit the range of motion of the camera of my player only when “hidden” in a closet, after leaving I just reset the values to what they were on game start. Thanks!

---

<div class="post-metadata">

**Author:** ![SeniorKukulkan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SeniorKukulkan](https://forums.unrealengine.com/u/SeniorKukulkan)\
**Post date:** [May 19, 2024, 7:15pm UTC](https://forums.unrealengine.com/t/how-to-set-max-and-min-yaw-for-camera-player-rotation/314341/11 "2024-05-19T19:15:32Z")

</div>

Another solution to set max and min yaws from character rotation, not world

 ![viewcam1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/1/ac18b16fdf005a8ecf804500f4cc78274101712b.png)

**Adjust “FirstPersonYawAngle” to the angle you want to limit**

If you want to go back to normal set the variable to the default:  
ViewYawMin = -89.900002  
ViewYawMax = 89.900002

Hope it helps (¬‿¬)

 ![viewcam1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/1/ac18b16fdf005a8ecf804500f4cc78274101712b.png)  
 ![camViewYaw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/3/64367d80a31ac76dca3bb577486f76f2b1dc2af2.png)
