27 UFUNCTION(BlueprintImplementableEvent, Category=
"Security Camera")
28 void OnSnappedToObject(const
bool bValue);
32 virtual
void BeginPlay() override;
33 virtual
void GetActorEyesViewPoint(FVector& OutLocation, FRotator& OutRotation) const override;
34 virtual
bool GetIsUpsideDown() const override;
36 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Security Camera|Visual")
37 UStaticMeshComponent* BaseMeshComponent;
38 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Security Camera|Visual")
39 UStaticMeshComponent* HeadMeshComponent;
40 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Security Camera|Visual")
41 UCameraComponent* CameraComponent;
42 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Security Camera|Visual")
43 USpotLightComponent* SpotLightComponent;
44 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Security Camera|Visual")
45 USceneCaptureComponent2D* SceneCaptureComponent;
46 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Security Camera|Visual")
47 USceneComponent* SnapTargets;
49 virtual
void TargetSeen(APawn* Pawn) override;
51 virtual
void EnemySeen() override;
52 virtual
void LostAllTargets() override;
53 virtual
void RotateToTarget() override;
55 UFUNCTION(BlueprintCallable, Category="Security Camera")
58 virtual
void OnDeath(AActor* OwningActor,
EDeathType DeathType, AActor* DeathCauser, AController* DeathInstigator) override;
60 virtual UPrimitiveComponent* GetGrabComponent() const override;
67 virtual void SetSnapped(
const bool bValue)
override;
68 virtual TArray<UArrowComponent*> GetSnapComponents()
override;
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=
"Security Camera|Physics")
73 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Security Camera|Physics")
74 bool bSnapped = false;
76 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Security Camera|Rotation")
77 float CameraRotateFrequency = 0.1f;
78 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Security Camera|Rotation")
79 float CameraRotateToTargetFrequency = 0.1f;
81 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Security Camera|Rotation")
82 float CameraMaxRotation = 90.0f;
84 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Security Camera|Rotation")
85 float CameraTargetRotationTolerance = 10.0f;
87 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Security Camera|Rotation")
88 float VisibilityPercentNeeded = 60.0f;
89 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "Security Camera|Rotation")
90 float RotationOffset = -90.0f;
95 void RotateBackToStart();
98 bool bChangeDirection = false;
100 float LerpAlpha = 0.0f;
102 FRotator StartRelativeRotation = FRotator::ZeroRotator;
104 FTimerHandle RotateTimerHandle;
105 FTimerHandle RotateToTargetTimerHandle;
107 FTimerHandle RotateBackToStartTimerHandle;