I recently played a horror-type game and when exploring the map I found this really cool hallway that has this door that moves farther away from the player as they walk towards it, eventually stopping after a while. (video is attached, had to upload it to youtube cause the file was too big to post here)
does anyone have any tips on how I could go about recreating this?
A general idea I’d probably do is to have a long hallway, and then have an invisible wall that detects when the player is close using magnitude. Then, I’d write a script to check if the player gets closer to the door and, if they do, move the door backwards on a certain axis until the door reaches a certain point in the world.