Fixed More FOV issues and removed FOV when Sprinting
This commit is contained in:
parent
3395c2083a
commit
cdac36f359
BIN
EndlessVendetta/Content/Levels/TrainingFacility.umap
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Levels/TrainingFacility.umap
(Stored with Git LFS)
Binary file not shown.
@ -86,7 +86,6 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime)
|
|||||||
}
|
}
|
||||||
else if (MoveGroundSpeed <= 0)
|
else if (MoveGroundSpeed <= 0)
|
||||||
{
|
{
|
||||||
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
|
|
||||||
bIsPlayerMoving = false;
|
bIsPlayerMoving = false;
|
||||||
}
|
}
|
||||||
if (bPressedJump)
|
if (bPressedJump)
|
||||||
@ -105,7 +104,6 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime)
|
|||||||
if (CurrentStamina <= 0.0f)
|
if (CurrentStamina <= 0.0f)
|
||||||
{
|
{
|
||||||
bIsPlayerSprinting = false;
|
bIsPlayerSprinting = false;
|
||||||
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
|
|
||||||
CurrentStamina = 0.0f;
|
CurrentStamina = 0.0f;
|
||||||
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
|
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
|
||||||
}
|
}
|
||||||
@ -554,7 +552,6 @@ void AEndlessVendettaCharacter::Sprint()
|
|||||||
if (MoveGroundSpeed > 0)
|
if (MoveGroundSpeed > 0)
|
||||||
{
|
{
|
||||||
CharacterMovement->MaxWalkSpeed = SprintSpeed;
|
CharacterMovement->MaxWalkSpeed = SprintSpeed;
|
||||||
this->GetFirstPersonCameraComponent()->SetFieldOfView(100);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -566,7 +563,6 @@ void AEndlessVendettaCharacter::StopSprint()
|
|||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Display, TEXT("Player stopped sprinting"));
|
UE_LOG(LogTemp, Display, TEXT("Player stopped sprinting"));
|
||||||
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
|
CharacterMovement->MaxWalkSpeed = OriginalWalkSpeed;
|
||||||
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -590,7 +586,6 @@ void AEndlessVendettaCharacter::Jumping()
|
|||||||
void AEndlessVendettaCharacter::StopJump()
|
void AEndlessVendettaCharacter::StopJump()
|
||||||
{
|
{
|
||||||
Super::StopJumping();
|
Super::StopJumping();
|
||||||
UE_LOG(LogTemp, Display, TEXT("Player has stopped jumping"));
|
|
||||||
bHasPlayerJumped = false;
|
bHasPlayerJumped = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ public:
|
|||||||
|
|
||||||
bool bIsPlayerMoving = false;
|
bool bIsPlayerMoving = false;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere)
|
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
|
||||||
bool bIsPlayerSprinting = false;
|
bool bIsPlayerSprinting = false;
|
||||||
|
|
||||||
double MoveGroundSpeed;
|
double MoveGroundSpeed;
|
||||||
@ -177,6 +177,7 @@ public:
|
|||||||
|
|
||||||
void Jumping();
|
void Jumping();
|
||||||
void StopJump();
|
void StopJump();
|
||||||
|
UPROPERTY(BlueprintReadWrite)
|
||||||
bool bHasPlayerJumped = false;
|
bool bHasPlayerJumped = false;
|
||||||
|
|
||||||
UArrowComponent* ScopedLocationArrow;
|
UArrowComponent* ScopedLocationArrow;
|
||||||
|
Loading…
Reference in New Issue
Block a user