# Is there a way to cancel the un crouch function. 

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [September 18, 2026, 5:04pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091 "2026-09-18T17:04:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![3D\_guy\_the\_2nd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3D\_guy\_the\_2nd](https://forums.unrealengine.com/u/3D_guy_the_2nd)\
**Post date:** [September 18, 2026, 5:04pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/1 "2026-09-18T17:04:07Z")

</div>

![unreal engine shot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/c/dfcc7ff11c31cadf774b7e9e4342fbe45c63c2f1.png)I’m new to unreal engine and I’m trying to set up a crouch system using the built-in function.

So, this setup works fine. until I walk under something and try to un crouch then crouch before walking out from under it. even thou I called crouch again it un crouches when there is no longer anything in the way. so is there a way to cancel the un crouch function or something.

---

<div class="post-metadata">

**Author:** ![Voxiit](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/voxiit/32/1217475_2.png) [@Voxiit](https://forums.unrealengine.com/u/Voxiit)\
**Post date:** [September 18, 2026, 10:04pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/2 "2026-09-18T22:04:42Z")

</div>

Hi there!

I’m not sure to understand.  
You’ve tried to UnCrouch while having something above your head right ? And then, if you want to Crouch again it won’t work ?

---

<div class="post-metadata">

**Author:** ![3D\_guy\_the\_2nd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3D\_guy\_the\_2nd](https://forums.unrealengine.com/u/3D_guy_the_2nd)\
**Post date:** [September 18, 2026, 10:39pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/3 "2026-09-18T22:39:23Z")

</div>

Sorry I wrote the explanation pretty confusing. I think this might be a bit better.

When I run UnCrouch under an object it stays crouched like it’s supposed to, but when I run Crouch again while still under the object it will UnCrouch when the object is no longer in the way without me running the UnCrouch function again. So since UnCrouch was blocked by an object it keeps running until it’s clear even thou I called Crouch again.

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [September 19, 2026, 12:42am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/4 "2026-09-19T00:42:22Z")

</div>

Could do a quick line trace straight up before calling uncrouch, adda branch and if trace hit something do nothing, and on false, call uncrouch. Or use capsule/sphere trace that matches size of standing capsule.

Err, on second thought, I think the flip flop is just breaking it. Try doing this instead:

 ![2Crouch_or_not_2crouch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/d/51ddf6edbadfd84b375716a284418619080c2677.jpeg)

Ignore wires going offscreen to the right. Those are just sending BPI messages to follower NPC telling them to (un)crouch too.

---

<div class="post-metadata">

**Author:** ![3D\_guy\_the\_2nd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3D\_guy\_the\_2nd](https://forums.unrealengine.com/u/3D_guy_the_2nd)\
**Post date:** [September 19, 2026, 5:07am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/5 "2026-09-19T05:07:45Z")

</div>

the line trace would work but then if I try to UnCrouch under an object it would just not call the function rather than un crouching once the object was no longer in the way.

the branch node method works fine to, but if I go under an object hit UnCrouch then Crouch again it still un crouches when the object is no longer in the way, rather than staying crouched. but it still works good enough I might use it if I can’t figure this out.

thank you for your help.

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [September 19, 2026, 6:06am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/6 "2026-09-19T06:06:34Z")

</div>

Would probably need to override character movement logic in c++ to preserve a crouch after calling uncrouch and crouching again before clearing obstacle.

---

<div class="post-metadata">

**Author:** ![Voxiit](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/voxiit/32/1217475_2.png) [@Voxiit](https://forums.unrealengine.com/u/Voxiit)\
**Post date:** [September 19, 2026, 12:28pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/7 "2026-09-19T12:28:10Z")

</div>

You should then add a capsule or line trace before calling the uncrouch function like @illspiritx was saying.  
And you should make sure that the Character isn’t already crouch before calling the Crouch function.

Those modifications should be enough to fix your problem.

---

<div class="post-metadata">

**Author:** ![3D\_guy\_the\_2nd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3D\_guy\_the\_2nd](https://forums.unrealengine.com/u/3D_guy_the_2nd)\
**Post date:** [September 19, 2026, 11:17pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/8 "2026-09-19T23:17:32Z")

</div>

that would work. but I don’t know what I am overriding. when UnCrouch is called it sets the WantsToCrouch boolean to false. but I dont know where it goes from there.

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [September 20, 2026, 4:56am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/9 "2026-09-20T04:56:51Z")

</div>

I can’t find it either, presumably it’s checking for bEncroached somehow when deciding to uncrouch later. Maybe in CharacterMovementComponentAsync.cpp?

---

<div class="post-metadata">

**Author:** ![3D\_guy\_the\_2nd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3D\_guy\_the\_2nd](https://forums.unrealengine.com/u/3D_guy_the_2nd)\
**Post date:** [September 20, 2026, 3:48pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/10 "2026-09-20T15:48:07Z")

</div>

I think at this point it might be easier to make my own crouch system.

---

<div class="post-metadata">

**Author:** ![3D\_guy\_the\_2nd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3D\_guy\_the\_2nd](https://forums.unrealengine.com/u/3D_guy_the_2nd)\
**Post date:** [October 18, 2026, 5:48pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-cancel-the-un-crouch-function/2817091/11 "2026-10-18T17:48:39Z")

</div>

I got it figured out.

 ![unrealProblemFixed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/4/8e42e1380a3ce10acc3cffee8b6370d416519299.png)
