Doors
The door-related mechanics include Unlocked Door, Locked Door and Key, Fixed-valve and Door, and Valve and Door. Let's take Unlocked Door as an example. It is a smart asset that enables a door to be openable and closable.
In our case, we want to set up a hinged metal door. To do so, we rely on this smart asset and a new model Door_Metal_Grid. Follow these steps:
-
Open Asset Box, under Horror Asset go to Gameplay>Puzzle, then add Unlocked Door to the scene.
-
Adjust the position of the door in the scene to your desired location. Try playtesting to ensure that the smart asset is functioning correctly. Then, we'll replace the door model with a new one, while preserving the same functionality.
-
Find a suitable model for the door. For example, we select the model Door_Metal_Grid from the Basic category of Horror Asset in Asset Box and add it to the scene.
-
In Scene Explorer unfold Doorbody, click [Model]DoorBody*ColliderIsNecessary, and copy its transform properties.
-
Paste the copied transform properties into that of Door of Door_Metal_Grid. This way, the new door body is placed in the same relative location and you can continue to adjust its position and size later.
-
Drag Door from Door_Metal_Grid into the folder Doorbody of Unlocked Door, then delete [Model]DoorBody*ColliderIsNecessary. This makes the new door body inherit all preset logic.
Note: Ensure that all interactive objects in the scene, including door bodies, have colliders attached for proper functionality.
The new hierarchy of Unlocked Door looks like this:
-
Adjust the position and size of the door frame by adjusting the transform properties of Door_Metal_Grid_Frame. You'll get a new hinged door:
If you want to customize the door animation, locate the Open cutscene or Close cutscene in Scene Explorer, then click Edit Cutscene in the properties window to access the timeline editor. Here, you can re-record the animation. For more information on cutscenes, see Cutscenes.