After adding the close door delay my unreal editor crashes when I play.
When I remove that part of the code:
if (GetWorld()->GetTimeSeconds() - LastDoorOpenTime > ClosedDoorDelay) {
CloseDoor();
}
I can start it but it will crash to desktop as soon as i enter the collider.
Also the rotation code:
void UOpenDoor::OpenDoor()
{
//set rotation
Owner->SetActorRotation(FRotator(0.0f, OpenAngle, 0.0f));
}
void UOpenDoor::CloseDoor()
{
//set rotation
Owner->SetActorRotation(FRotator(0.0f, 0.f, 0.0f));
}
I am not where to look to figure out why it is happening.