Hellow its again me.
When I had problem with Generated_Body, I say ignored red lines and now my VS Code dont show me any syntax error.
After that I have error but make all like in the lesson xd
OpenDoor.cpp
void UOpenDoor::OpenDoor(float DeltaTime)
{
CurrentYaw = FMath::Lerp(CurrentYaw, OpenAngle, DeltaTime * DoorOpenSpeed;)
FRotator DoorRotation = GetOwner()->GetActorRotation();
DoorRotation.Yaw = CurrentYaw;
GetOwner()->SetActorRotation(DoorRotation);
}
void UOpenDoor::CloseDoor(float DeltaTime)
{
CurrentYaw = FMath::Lerp(CurrentYaw, InitialYaw, DeltaTime * DoorCloseSpeed);
FRotator DoorRotation = GetOwner()->GetActorRotation();
DoorRotation.Yaw = CurrentYaw;
GetOwner()->SetActorRotation(DoorRotation);
}
OpenDoor.h
private:
float InitialYaw;
UPROPERTY(EditAnywhere)
float CurrentYaw;
float OpenAngle = 90.f;
float DoorLastOpened = 0.f;
UPROPERTY(EditAnywhere)
float DoorCloseDelay = 1.f;
UPROPERTY(EditAnywhere)
float DoorOpenSpeed = 0.8f;
UPROPERTY(EditAnywhere)
float DoorCloseSpeed = 2.f;
UPROPERTY(EditAnywhere)
ATriggerVolume* PressPlate;
UPROPERTY(EditAnywhere)
AActor* ActorThatOpens;
};