Space Plunder
Loading...
Searching...
No Matches
ALSPlayerCameraManager.h
Go to the documentation of this file.
1// Copyright: Copyright (C) 2022 Doğa Can Yanıkoğlu
2// Source Code: https://github.com/dyanikoglu/ALS-Community
3
4#pragma once
5
6#include "CoreMinimal.h"
7#include "Camera/PlayerCameraManager.h"
8#include "ALSPlayerCameraManager.generated.h"
9
10// forward declarations
13
17UCLASS(Blueprintable, BlueprintType)
18class ALSV4_CPP_API AALSPlayerCameraManager : public APlayerCameraManager
19{
20 GENERATED_BODY()
21
22public:
24
25 UFUNCTION(BlueprintCallable, Category = "ALS|Camera")
26 void OnPossess(AALSBaseCharacter* NewCharacter);
27
28 UFUNCTION(BlueprintCallable, Category = "ALS|Camera")
29 float GetCameraBehaviorParam(FName CurveName) const;
30
32 UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "ALS|Camera")
33 void DrawDebugTargets(FVector PivotTargetLocation);
34
35protected:
36 virtual void UpdateViewTargetInternal(FTViewTarget& OutVT, float DeltaTime) override;
37
38 UFUNCTION(BlueprintCallable, Category = "ALS|Camera")
39 static FVector CalculateAxisIndependentLag(
40 FVector CurrentLocation, FVector TargetLocation, FRotator CameraRotation, FVector LagSpeeds, float DeltaTime);
41
42 UFUNCTION(BlueprintCallable, Category = "ALS|Camera")
43 bool CustomCameraBehavior(float DeltaTime, FVector& Location, FRotator& Rotation, float& FOV);
44
45public:
46 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "ALS|Camera")
47 TObjectPtr<AALSBaseCharacter> ControlledCharacter = nullptr;
48
49 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "ALS|Camera")
50 TObjectPtr<USkeletalMeshComponent> CameraBehavior = nullptr;
51
52protected:
53 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "ALS|Camera")
54 FVector RootLocation;
55
56 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "ALS|Camera")
57 FTransform SmoothedPivotTarget;
58
59 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "ALS|Camera")
60 FVector PivotLocation;
61
62 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "ALS|Camera")
63 FVector TargetCameraLocation;
64
65 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "ALS|Camera")
66 FRotator TargetCameraRotation;
67
68 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Camera")
69 FRotator DebugViewRotation;
70
71 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Camera")
72 FVector DebugViewOffset;
73
74private:
75 UPROPERTY()
77};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition ALSBaseCharacter.h:38
TObjectPtr< UALSPlayerCameraBehavior > CameraBehavior
Definition ALSBaseCharacter.h:688
TObjectPtr< UALSDebugComponent > ALSDebugComponent
Definition ALSBaseCharacter.h:708
Definition ALSPlayerCameraManager.h:19
Definition ALSDebugComponent.h:17