Door Mechanic


2022-04-15 18-55-34.mp4


This door mechanic was made to make a dynamic door mechanic that can be used without any limitations from the code perspective. 

I wanted to make it work with whatever possible combination of interaction types so I did not have the need to make multíple door blueprints for multiple situations.

Door Opening/ Trigger Type

The doors opening limit is set by an Enum that the developer sets in editor of how many times they want the door to be opened and closed.

The door mechanics trigger types are set by an editable Enum value that the developer can set in editor.


Door Movement

Gets player actor location and determines what side of the door the player is on, then the timeline updates door rotation, and when the door is open it sets collision and door state. If the door has already been opened and the door is closing the door state changes accordingly.