uncrouching under a something wil get you stuck


this is the blueprint

You believe a crouched character would normally be able to move under this certain obstacle?

what do you mean?

From the looks of the code, you have a method of crouching that perhaps is visually working? Have you tried moving the character under some platform? Is this when they got stuck? Or did stuck happen instantly when you tried?

the character can go under something but when you let go of the crouch button you get clipped trough the object and get stuck

Your character is using Character Movement Component (CMC). It has built in Crouch functionality. Crouch and UnCrouch. These functions check if the character can crouch/uncrouch respectively.

If you want to go custom then you need to do your own sphere collision checks. For uncrouch you do a sphere trace the radius of the capsule component, from the ground (root location) up to the full height of the capsule when standing. If it hits something, you cannot stand.

1 Like

how about set crouch high instead?there is a crouch function built in.
But the transition is not smooth.
You could try to set it to crouch first and and then set crouch high with the timeline.(not sure if it has difference but you could have a try)

All you need to do with the default crouch/uncrouch is slow the animation play rate. The capsule component is invisible, so its state has no bearing on the mesh visuals.

dont know if this is what u meant but it works

Crouch and uncrouch already adjust the capsule.

Open the Crouch/UnCrouch animations and adjust the play rate in the details panel.

When I made my crouch/uncrouch system i made a line trace which detects if there is something above the player.