# Disable camera movement when crouching

**URL:** <https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721>\
**Category:** Cinematics & Media\
**Tags:** crouch, unreal-engine, question, Blueprint\
**Created:** [September 14, 2014, 11:44pm UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721 "2014-09-14T23:44:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JakeOfSpades\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JakeOfSpades\_1](https://forums.unrealengine.com/u/JakeOfSpades_1)\
**Post date:** [September 14, 2014, 11:44pm UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/1 "2014-09-14T23:44:49Z")

</div>

When you use Crouch function in Unreal, it changes half height of capsule component and thus camera adjusts. However, I would like to adjust capsule height but not move camera. If I dont change half height for capsule component on player I get what I want but I can’t crouch under objects as my capsule is still same height. Im doing a 2.5D Sidescroller and this is slightly annoying. What are my options?

---

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [September 15, 2014, 12:01am UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/2 "2014-09-15T00:01:58Z")

</div>

May I see your Components tab?

I’m not entirely sure what’s wrong and it’s hard to find what exactly you did do wrong without knowing your setup.

Just a small picture of tab on side with root, mesh and so on. 🙂

---

<div class="post-metadata">

**Author:** ![JakeOfSpades\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JakeOfSpades\_1](https://forums.unrealengine.com/u/JakeOfSpades_1)\
**Post date:** [September 15, 2014, 1:20am UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/3 "2014-09-15T01:20:24Z")

</div>

Here you go:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/f/2f0984456f8dd47c5beb0a68b72c3d6cf62ef2aa.jpeg) ](http://tinypic.com/images/goodbye.jpg)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/f/2f0984456f8dd47c5beb0a68b72c3d6cf62ef2aa.jpeg) ](http://tinypic.com/images/goodbye.jpg)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/f/2f0984456f8dd47c5beb0a68b72c3d6cf62ef2aa.jpeg) ](http://tinypic.com/images/goodbye.jpg)

---

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [September 15, 2014, 1:24am UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/4 "2014-09-15T01:24:42Z")

</div>

Ah I just meant one picture of little components tab on left but more better 😃

Anyway sorry that I can’t provide a solution right away but I’m only on my laptop right now and won’t get back on Unreal till tomorrow. If there’s no solution by then I’ll come back to it and search for a fix 🙂

---

<div class="post-metadata">

**Author:** ![Nice\_Rain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nice\_Rain](https://forums.unrealengine.com/u/Nice_Rain)\
**Post date:** [September 15, 2014, 1:57am UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/5 "2014-09-15T01:57:11Z")

</div>

I’m not exactly sure how your setup is done, but I would do something along these lines:

Get height change of camera component when you crouch and just set camera location to location + height change. This should keep z value same as it was before.

In other words, set Z value of relative location of camera component when you crouch to add Z to it so it doesn’t move.

---

<div class="post-metadata">

**Author:** ![JakeOfSpades\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JakeOfSpades\_1](https://forums.unrealengine.com/u/JakeOfSpades_1)\
**Post date:** [September 15, 2014, 8:27pm UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/6 "2014-09-15T20:27:36Z")

</div>

Thats what I have tried, however going from In Air to crouch makes camera shake a bit which Im trying to fix.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [September 15, 2014, 10:20pm UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/7 "2014-09-15T22:20:37Z")

</div>

Your best option is going to be creating your own custom crouch function, as pre-made function is going to move camera by default. You can take a look at this post for an idea of how to set that up:

> **[Camera doesn't stop going down with Lerp(on timeline)](https://forums.unrealengine.com/questions/86931/camera-doesnt-stop-going-down-with-lerpon-timeline.html)**
>
> Hello, I’m trying to make custom smooth crouch for my character, but when using timeline with lerp (as seen on screenshot) camera doesn’t stop going down when it should and I end up looking at bottom of the map. The same blueprint works if I ignore...

Hope that helps!

---

<div class="post-metadata">

**Author:** ![JakeOfSpades\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JakeOfSpades\_1](https://forums.unrealengine.com/u/JakeOfSpades_1)\
**Post date:** [September 16, 2014, 9:46pm UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/8 "2014-09-16T21:46:12Z")

</div>

I found a dirty fix you could say. I attached camera to mesh instead of root component and worked like a beaut, it would only move by 1 up or down Z axis so I just told camera to move up 1 or down 1 depending on crouching or not. I did same method with Root component but its a bigger difference and there is some shakyness.

Tl;DR Attached camera to mesh, all good.

---

<div class="post-metadata">

**Author:** ![skokonXD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@skokonXD](https://forums.unrealengine.com/u/skokonXD)\
**Post date:** [February 16, 2025, 8:34pm UTC](https://forums.unrealengine.com/t/disable-camera-movement-when-crouching/293721/9 "2025-02-16T20:34:20Z")

</div>

You need to override `OnStartCrouch` and `OnEndCrouch` because they modify the character’s Z-axis. This is why the camera position also changes when crouching
