I already have the crouching itself working, but I’m having a similar problem as a lot of people, where my character just snaps to the crouching location instead of moving down realistically. Anyone know how to fix this problem specifically?
Here’s my code:
void AFPSCharacter::StartCrouch()
{
if (CharacterMovement)
{
if (CanCrouch())
{
CharacterMovement->bWantsToCrouch = true;
}
}
}
void AFPSCharacter::EndCrouch()
{
if (CharacterMovement)
{
CharacterMovement->bWantsToCrouch = false;
}
}
Also, I just saw now that the link I posted also mentions my post on the forums.
Just note that this link explains how to implement custom crouching from scratch, i.e. without using any of the crouch code provided in UE4, which is my preferred way of doing it.