cpp:
{
Super::BeginPlay();
float MouseY = 0.0f;
float MouseX = 0.0f;
FVector Y = FVector(0, 0, 0);
FRotator X = FRotator(0, 0, 0);
FOnTimelineFloat TimelineProgress;
TimelineProgress.BindUFunction(this, FName("TimelineProgress"));
FCurveTimeline.AddInterpFloat(CurveFloat, TimelineProgress);
FCurveTimeline.SetLooping(true);
StartLoc = EndLoc = GetActorRotation();
EndLoc.Yaw * PC->GetControlRotation() * 100;
FCurveTimeline.PlayFromStart();
}
void AInteractBase::TimelineProgress(float Value)
{
//value between distances
FRotator NewLocation = FMath::Lerp(StartLoc, EndLoc, Value);
SetActorRotation(NewLocation);
}
H file
UFUNCTION()
void TimelineProgress(float Value);
FTimeline FCurveTimeline;
UPROPERTY(EditAnywhere,Category = "Movement")
UCurveFloat* CurveFloat;
UPROPERTY()
FRotator StartLoc;
UPROPERTY()
FRotator EndLoc;
UPROPERTY()
APlayerController* PC;
UPROPERTY(EditAnywhere,Category = "Timeline")
float ZOffset;
Exception thrown at EndLoc.Yaw * PC->GetControlRotation() * 100;
The error: Unhandled exception at 0x00007FFC3A5643DF (UE4Editor-OtherProjectWouldNot.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
Why am I getting this?