Outlast styled hiding system?

I tried googling for steps on how to do this, had no luck. I want a first person character to be able to hide in cupboards like outlast style.

How do you go about doing this? Yes I can create a Cupboard that opens door on key press, after that how do I make the player go into the cupboard automatically? Is that an animation?

Just point me in the right direction so i know how I can achieve this?

TIA

I would assume that you should use an animation, or change the location of the player using a timeline/sweep. This of course depends on whether the game is first person or not.

Here’s how I’d go about doing this:

  1. Add an arrow or target point to your cupboard BP, this will be the final location (inside the cupboard).
  2. When the user presses the button that is meant to get them into the cupboard, cast to your character blueprint and add a timeline to get them into that location (After the door opening of course).
  3. When the user is inside and the door is closed, make it so that the user cannot use their items (flashlight, weapon, etc), or make it so that the items and hand(s) are hidden completely.
  4. Disable the moving mechanism so the user can only look around (or even make it so that they can’t look around either and have to look forward)
  5. When the user presses the key to get out, do all that but in reverse!

I hope this helps!

Tom

EDIT: Quick note, you could also add a point outside the cupboard for when the user exits. Alternatively, you could save the location of the player before they enter the cupboard. Good luck!