Add sprinting animation

This commit is contained in:
baz 2024-01-24 17:20:26 +00:00
parent 4c4799b10a
commit d3ba88cb3a
3 changed files with 7 additions and 2 deletions

Binary file not shown.

View File

@ -299,6 +299,8 @@ void APlayerCharacter::SetSprintingCallback(const FInputActionInstance& Instance
{
cmc->EnableSprint();
}
IsSprinting = true;
}
void APlayerCharacter::SetWalkingCallback(const FInputActionInstance& Instance)
@ -307,6 +309,8 @@ void APlayerCharacter::SetWalkingCallback(const FInputActionInstance& Instance)
{
cmc->DisableSprint();
}
IsSprinting = false;
}
void APlayerCharacter::CalculateHits(TArray<FHitResult>* hits)

View File

@ -121,6 +121,7 @@ private:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (AllowPrivateAccess = "true"))
UAIPerceptionStimuliSourceComponent* PerceptionSource;
UPROPERTY(BlueprintReadOnly, Meta = (AllowPrivateAccess = "true"))
bool IsSprinting = false;
bool IsADS = false;