I’m not sure why my character is not able to crouch. I set up everything correctly(I think). I new to unreal and I know this is a noob question but I’m confused. It prints out Hit so I know i’m calling the function correctly.
void AHumanoidCharacter::ToggleCrouch()
{
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT("Hit"));
GetCharacterMovement()->IsCrouching() ? GetCharacterMovement()->UnCrouch() : GetCharacterMovement()->Crouch();
}
//Here is my binding action
PlayerInputComponent->BindAction("Crouch",IE_Pressed,this,&AHumanoidCharacter::ToggleCrouch);