Custom crouching - jumping bug

Hello guys. I’ve set up custom crouch. The crouch itself is nice and smooth. However if Im crouched > Jump > uncrouch, I dont get uncrouched until I move right or backwards. And the strange thing is that I actually get uncrouhed right away, but only like 40%. If you want more details, I can post a video.

Doesn’t seem like a bug. When you jumping you didn’t tell the character what to do. You changed the capsule half height with your crouch button but you never told your character that he/she should do anything when you hit the jump button. You need to change it so that when you press jump the half capsule height changes to whatever value you had it when the character was standing up.

Do you mean something like that? Doesnt really help though :confused: Can you go more into details? Im still new on unreal engine. I think that when I do uncrouch, both camera relative location and capsule half height should normalize to starting point, doesnt matter its after jump, or not, but it doesnt get like that.

Video: - YouTube

Sorry for bumping, but I need this fixed really hard and I cant find any solution :confused:

I wonder if the Character Movement is registered as Falling during the change of the Capsule Half Height?

If you bypassed that Branch on the Crouch, would it work 100% of the time or not at all?

Not to mention that the Input is executed at the moment of input, so that Branch after the Jump should always register as True because a millisecond after the Jump, that character is in the air and unless they have an extremely short or fast jump…

…what you may want to look into is an Event On Landed or something to that effect. Off of Landing, you would do your falling check (possible double-jumps and cliff hangers, etc) and set your Capsule Half Height.

Hey, thanks for reply! I don’t get much help so I appreciate every help I get.

  1. No, it doesn’t, checked with "if (GetCharacterMovement()->IsFalling())
    GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT(“ISFALLING”)); "
  2. I made the falling branch just so camera doesn’t change when I jump and crouch middle-air. The crouch works with it and without it. It also doesnt affect the bug.
  3. It would work if I bypassed that branch.
    I tried adding event on landed: Imgur: The magic of the Internet . It checks if player is crouched, if true, sets camera and capsule half height to crouched state. I can’t get what Jump changes so the crouch stops working as intended? By the if I don’t set cameras location to crouched, the bug doesn’t occur, so the problem is with camera and jump function.

Bump bump bump

You are actually right. I changed it back to standing and the bug disappeared. However is there any way I can keep the crouched half height while player is jumping? The problem is that the player collision is the same when he is jumping crouched(capsule), which is pointless.