Fixed More FOV issues and removed FOV when Sprinting

This commit is contained in:
MH261677 2023-12-12 11:39:52 +00:00
parent 3395c2083a
commit cdac36f359
3 changed files with 3 additions and 7 deletions

Binary file not shown.

View File

@ -86,7 +86,6 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime)
}
else if (MoveGroundSpeed <= 0)
{
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
bIsPlayerMoving = false;
}
if (bPressedJump)
@ -105,7 +104,6 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime)
if (CurrentStamina <= 0.0f)
{
bIsPlayerSprinting = false;
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
CurrentStamina = 0.0f;
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
}
@ -554,7 +552,6 @@ void AEndlessVendettaCharacter::Sprint()
if (MoveGroundSpeed > 0)
{
CharacterMovement->MaxWalkSpeed = SprintSpeed;
this->GetFirstPersonCameraComponent()->SetFieldOfView(100);
}
}
}
@ -566,7 +563,6 @@ void AEndlessVendettaCharacter::StopSprint()
{
UE_LOG(LogTemp, Display, TEXT("Player stopped sprinting"));
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
}
}
@ -590,7 +586,6 @@ void AEndlessVendettaCharacter::Jumping()
void AEndlessVendettaCharacter::StopJump()
{
Super::StopJumping();
UE_LOG(LogTemp, Display, TEXT("Player has stopped jumping"));
bHasPlayerJumped = false;
}

View File

@ -127,7 +127,7 @@ public:
bool bIsPlayerMoving = false;
UPROPERTY(VisibleAnywhere)
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
bool bIsPlayerSprinting = false;
double MoveGroundSpeed;
@ -177,6 +177,7 @@ public:
void Jumping();
void StopJump();
UPROPERTY(BlueprintReadWrite)
bool bHasPlayerJumped = false;
UArrowComponent* ScopedLocationArrow;