29 virtual void BeginPlay()
override;
30 virtual void EndPlay(EEndPlayReason::Type EndPlayReason)
override;
31 virtual void UpdateCameraBehavior(
AGameCameraManager* CameraManager,
float DeltaTime)
override;
36 UFUNCTION(BlueprintCallable, Category =
"Targeting|Input")
37 void BeginTargeting();
39 UFUNCTION(BlueprintCallable, Category =
"Targeting|Input")
40 void ToggleTargeting();
42 UFUNCTION(BlueprintCallable, Category =
"Targeting|Input")
43 void CycleTarget(
float WheelDelta);
45 UFUNCTION(BlueprintCallable, Category =
"Targeting")
46 void ReleaseTargeting();
48 UFUNCTION(BlueprintCallable, Category =
"Targeting")
49 void SetTargetingPrevented(
bool bInPrevented);
51 UFUNCTION(BlueprintPure, Category =
"Targeting")
52 bool IsTargeting()
const;
54 UFUNCTION(BlueprintPure, Category =
"Targeting")
55 bool HasTarget()
const;
57 UFUNCTION(BlueprintPure, Category =
"Targeting")
58 TScriptInterface<ITargetableInterface> GetCurrentTarget()
const;
61 UFUNCTION(BlueprintPure, Category =
"Targeting")
62 FORCEINLINE
bool IsTargetingPrevented()
const
64 return bTargetingPrevented;
70 void HideLastTargetingMarker();
71 void UpdateCameraToTarget(
float DeltaTime);
76 APlayerController* GetOwnerController()
const;
79 TArray<ITargetableInterface*> FindVisibleTargetingMarkerTargets(
const AGameCameraManager* CameraManager)
const;
85 UPROPERTY(EditDefaultsOnly, Category =
"Targeting", meta = (ClampMin =
"0.0", Units =
"Seconds"))
86 float CameraInterpTime = 0.15f;
88 UPROPERTY(EditDefaultsOnly, Category = "Targeting", meta = (ClampMin = "-89.0", ClampMax = "89.0"))
89 float TargetViewPitchOffset = 15.0f;
91 UPROPERTY(EditDefaultsOnly, Category = "Targeting")
92 bool bUseCustomPitchLimitAngle = true;
94 UPROPERTY(EditDefaultsOnly, Category = "Targeting", meta = (ClampMin = "0.0", ClampMax = "89.0", EditCondition = "bUseCustomPitchLimitAngle"))
95 float MaxPitchDownAngle = 32.0f;
97 UPROPERTY(EditDefaultsOnly, Category = "Targeting", meta = (ClampMin = "0.0"))
98 float WheelCycleThreshold = 0.5f;
102 TWeakObjectPtr<AActor> LastTargetingMarkerActor;
105 float MaxTargetingDistance = 0.0f;
106 float WheelAccumulator = 0.0f;
107 bool bTargetingPrevented = false;
108 bool bWantsTargeting = false;