Disable crouching while jumping

I’ll preface this with my usual disclaimer: I’m new to both UE and CPP, coming from a Java and proprietary engine background after some hiatus.

Now, I’m sure the solution to this is incredibly simple. I was going through and setting up my character pawn to do all the basic movements I require, like jumping, walking, running, etc etc. Everything worked as expected, but what I noticed when testing is that, while jumping, I could still crouch. This caused the character and camera to “pop” up a bit a bit. I realized I needed to disable crouching while jumping, so I added this to the two functions I use to control crouching:

if (!IsJumpProvidingForce())
	{
		Crouch();
	}

and

if (bIsCrouched)
{
UnCrouch();
}

Fairly straightforward checks, but they’re not taking. The problem and solution seem so simple, I’m having a hard time seeing what the problem could be.

Override this function:

Return false if you’re in the ‘falling’ state.

Or this one:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/ACharacter/CanCrouch/index.html

Cool, that worked. So, was the reason it didn’t work before because the checks weren’t being performed on that instance of the character…? Or something…?

To be honest, I’ve no idea.