My Building Escape after Getting The Door To Close lecture

In this lecture, we close the door on leaving the Trigger Volume. Cool right?

VS Code-

C file-

I’ve added a new function here, CloseDoor(DeltaTime). This function will close the door when not in the Trigger Volume.

C++ file-

We lerp between the InitialYaw and CurrentYaw(It just gives the initial position of the door). The door closes twice the speed it open.

UE Editor(When in TriggerVolume)-

UE Editor(When you come out from the TriggerVolume)-

I captured it as fast as I could so can you see I’m not in the corner of the room. So yeah, the code is working just fine.

P.S. - Be sure you are making changes in the right function. By mistake, I made the changes of the CloseDoor() function in The OpenDoor() function. BE CAREFUL!!

Previous Post: My Building Escape after Getting The Player To Open The Door lecture

Thanks for reading,
BYE!!

2 Likes

Thank you for the tip at the end.

1 Like

Stupid me, I made a whole lot of changes that should’ve been made in the other function. I got confused for a few moments, then realized the actual problem.

Privacy & Terms