I think I am posting under the correct lecture…
In Lecture 112 of the c++ Unreal course we are introduced to the function GetTimeSeconds to add a delay to the doors closing. Is there any reason we don’t use DeltaTime instead and count up the delay?
if (PressurePlate && PressurePlate -> IsOverlappingActor(ActorThatOpen)){
OpenDoor(DeltaTime);
DoorLastOpened = 0.f;
}
else if (DoorLastOpened > DoorCloseDelay){
CloseDoor(DeltaTime);
}
DoorLastOpened += DeltaTime;