From 15d2734c52aaa9c813bacb00267b7f5658d03b6a Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Wed, 26 Apr 2023 03:51:17 +0100 Subject: [PATCH] Bugfix Pointer Retaining Position After Combat Has Ended --- Content/Blueprints/Combat_UI/CombatCharacter.uasset | 4 ++-- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 5 +++++ Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index a9219a1..81d6e54 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f25c0c81bbb9b3c94eb649742dd64e21d3c91ab9345fdda91d35be4066f0b323 -size 146352 +oid sha256:b14e899d3b8f72c09561fe40dd1bd18fc9f1120cefc74619dd51d9c808f4b226 +size 146591 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 08a54d2..f45d69a 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -94,6 +94,11 @@ void ATempCharacter::Sneak() } +void ATempCharacter::ResetWidgetPointer() const +{ + WidgetPointer->SetWorldLocationAndRotation(FVector(0, 0, 0), FRotator(0, 0, 0).Quaternion()); +} + // Called every frame void ATempCharacter::Tick(float DeltaTime) { diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 06d50f0..3463954 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -19,6 +19,7 @@ class THE_TWILIGHT_ABYSS_API ATempCharacter : public ACharacter public: // Sets default values for this character's properties ATempCharacter(); + void ResetWidgetPointer() const; protected: // Called when the game starts or when spawned