I’m making an interactable and I am trying to access “GetPlayerController()” in my class, I’m having a bit of trouble figuring out. This is what I have tried:
#include “CoreMinimal.h”
#include “Components/TimelineComponent.h”
#include “GameFramework/Actor.h”
#include “InteractInterface.h”
#include “InteractBase.generated.h”
class AAGCharacter;
class UCurveFloat;
UCLASS()
class AG_API AInteractBase : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor’s properties
AInteractBase();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UFUNCTION()
void TimelineProgress(float Value);
FTimeline FCurveTimeline;
UPROPERTY(EditAnywhere,Category = "Movement")
UCurveFloat* CurveFloat;
UPROPERTY()
FRotator StartLoc;
UPROPERTY()
FRotator EndLoc;
AAGCharacter* Char;
APlayerController* PC = Char->GetControllerRotation();
//void GetInputMouseDelta(float& MouseX, float& MouseY) ;
UPROPERTY(EditAnywhere,Category = "Timeline")
float ZOffset;
//UPROPERTY(EditAnywhere, Category = "Skeletal Mesh")
// USkeletalMeshComponent* SkeletonMeshTurret;
};
this just shows an error? How can I access GetPlayerController()?