Good evening everyone!
I’m working on a small video game project, which has to do with a small cabin up in the mountains and the player trying to survive there… and I’m creating this in order to start learning Unreal and get my feet wet. The first problem that I’ve encountered and don’t know how to solve is how to open and close a door via the blueprint editor. I know how to open it, but I can’t figure out how to close it pressing the same button. I have a simple mesh for the door, and a collision box to trigger the event. I’ll attach below the blueprint I’m currently using. I’m hoping you guys know how to solve this petty problem and I can keep moving with the project!
What I want to do is to open and close the door at will once the player is inside the trigger box. The sequence is as follows: you press the “open door” key, and the door opens. Press it again and it closes.
I’ve attached two images of the rotation I’m giving to the door and a general picture of the blueprint setup. What do I need to create between the player pressing the keyboard key and the rotation to make it switch between one rotation and the other?
Thanks in advance for your time,