# Clamping Camera Pitch Rotation of a Floating Pawn

**URL:** <https://forums.unrealengine.com/t/clamping-camera-pitch-rotation-of-a-floating-pawn/2594380>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [July 7, 2025, 12:57am UTC](https://forums.unrealengine.com/t/clamping-camera-pitch-rotation-of-a-floating-pawn/2594380 "2025-07-07T00:57:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LumaraIG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LumaraIG](https://forums.unrealengine.com/u/LumaraIG)\
**Post date:** [July 7, 2025, 12:57am UTC](https://forums.unrealengine.com/t/clamping-camera-pitch-rotation-of-a-floating-pawn/2594380/1 "2025-07-07T00:57:39Z")

</div>

I am using a floating pawn here and the rotation works fine but is highly prone to flipping over. I know the problem is the pitch, I just have no idea how to successfully clamp it between -80 and 80 degrees. Any attempts I have made to clamp it are completely overwritten when hooked to Mouse Y (which the camera won’t rotate without.)

Any help would be appreciated.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/5/225179b41e13739cc9918e36b7edbf44b06d5cf8.png)

---

<div class="post-metadata">

**Author:** ![HaydenPrismatic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haydenprismatic/32/1017219_2.png) [@HaydenPrismatic](https://forums.unrealengine.com/u/HaydenPrismatic)\
**Post date:** [July 7, 2025, 2:08am UTC](https://forums.unrealengine.com/t/clamping-camera-pitch-rotation-of-a-floating-pawn/2594380/2 "2025-07-07T02:08:27Z")

</div>

Hi there,

You should be able to do this easily enough by only adding the relative rotation if the end result ends up in your desired range (-80 to 80 in this case). Here’s a screenshot of my implementation for reference:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/9/1/991ab4c0fdcf5f3e5f3f547d57879448be161716.png)

Since we don’t care about clamping yaw, we always apply this rotation, and we just selectively apply changes to the pitch. It’s also worth noting that I have made the Input Action value type an Axis2D and mapped it to Mouse XY 2D-Axis in the IMC so that I could pull through the Mouse X and Y slightly more elegantly with just the single node, but this isn’t strictly necessary.

Thanks,  
Hayden

---

<div class="post-metadata">

**Author:** ![LumaraIG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LumaraIG](https://forums.unrealengine.com/u/LumaraIG)\
**Post date:** [July 7, 2025, 3:29pm UTC](https://forums.unrealengine.com/t/clamping-camera-pitch-rotation-of-a-floating-pawn/2594380/3 "2025-07-07T15:29:56Z")

</div>

Thanks so much, works perfectly!
