Bugfix Force Look Pitch Not Correctly Set
This commit is contained in:
parent
9ecbd9c52d
commit
38ffd4f339
BIN
Content/BlueprintAI/AI/AIBruh.uasset
(Stored with Git LFS)
BIN
Content/BlueprintAI/AI/AIBruh.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
@ -10,6 +10,7 @@
|
||||
#include "Components/TextBlock.h"
|
||||
#include "Components/ProgressBar.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Kismet/KismetMathLibrary.h"
|
||||
#include "Misc/OutputDeviceNull.h"
|
||||
#include "the_twilight_abyss/PlayerTemp/TempCharacter.h"
|
||||
|
||||
@ -56,7 +57,8 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy, bool bWasShot)
|
||||
FVector Direction = Enemy->GetActorLocation() - PlayerActor->GetActorLocation();
|
||||
Direction.Normalize();
|
||||
FRotator LookAtRotation = FRotationMatrix::MakeFromX(Direction).Rotator();
|
||||
LookAtRotation.Pitch = -9.0f;
|
||||
const FRotator NewRotation = UKismetMathLibrary::FindLookAtRotation(Cast<UCameraComponent>(PlayerActor->FindComponentByClass<UCameraComponent>())->GetComponentLocation(), Cast<USkeletalMeshComponent>(EnemyActor->FindComponentByClass<USkeletalMeshComponent>())->GetComponentLocation());
|
||||
LookAtRotation.Pitch = NewRotation.Pitch - PlayerActor->GetActorRotation().Pitch;
|
||||
PlayerController->SetControlRotation(LookAtRotation);
|
||||
|
||||
if (EnemyBlackboard->GetValueAsBool("IsInCombat")) return;
|
||||
@ -87,14 +89,14 @@ void ATurnBaseCombatV2::CombatCheck(bool bWasShot)
|
||||
EisResource = 10;
|
||||
AzosResource = 10;
|
||||
IroquoidResource = 10;
|
||||
|
||||
|
||||
ChainDamageMultiplier = 1.0f;
|
||||
BaseDamageMultiplier = 1.0f;
|
||||
DamageMultiplierTextBlock->SetText(FText::FromString(""));
|
||||
|
||||
FProperty* ReactionSpeedProperty = EnemyActor->GetClass()->FindPropertyByName(FName("ReactionSpeed"));
|
||||
float* EnemyReactionSpeedPtr = ReactionSpeedProperty->ContainerPtrToValuePtr<float>(EnemyActor);
|
||||
|
||||
|
||||
CurrentComboString = "";
|
||||
UpdateComboString(CurrentComboString);
|
||||
RevertActionPoints();
|
||||
@ -103,7 +105,7 @@ void ATurnBaseCombatV2::CombatCheck(bool bWasShot)
|
||||
UpdateProgressBars();
|
||||
ClearBattleLog();
|
||||
EnableButtons();
|
||||
|
||||
|
||||
if (EnemyBlackboard->GetValueAsBool("Sight") && !bWasShot)
|
||||
{
|
||||
//bEnemyHasExtraTurn = true;
|
||||
|
Loading…
Reference in New Issue
Block a user