Old tech from bad GL

Well, I see that im used to some old tech :smile:
Here was my door timer. Wrote it ahed of the lesson :stuck_out_tongue:

   if (PressurePlate->IsOverlappingActor(ActorThatOpens))
    {
        OpenDoor();
        IsDoorOpen = true;
        DoorTimer = DoorCloseDelay;
    }
    if (IsDoorOpen)
    {
        DoorTimer -= 0.001f / DeltaTime;
        //UE_LOG(LogTemp,Warning,TEXT("Timer is %f"), DoorTimer );
        if (DoorTimer <= 0)
        {
            CloseDoor();
            IsDoorOpen = false;
        }
    }

Privacy & Terms