Best way to implement crouch in shooter game

I have this code for crouching in the shooter game:

void AShooterCharacter::OnBeginCrouch()
{
	float NewEyeHeigh = BaseEyeHeight / 4;

	bIsCrouched = true;
	
	CrouchedEyeHeight = NewEyeHeigh;

	RecalculateBaseEyeHeight();
}

void AShooterCharacter::OnStopCrouch()
{
	bIsCrouched = false;
	RecalculateBaseEyeHeight();
}

and I have this:

InputComponent->BindAction("BeginCrouch", IE_Pressed, this, &AShooterCharacter::OnBeginCrouch);
InputComponent->BindAction("StopCrouch", IE_Released, this, &AShooterCharacter::OnStopCrouch);

When I crouch the camera goes through the FPS Mesh. The camera moves but the FPS Mesh does not move.

You should attach mesh to camera. Make sure to create another mesh component for first person mesh, the one provided by ACharacter won’t move after camera.