How do I make a Phasmophobia door mechanic

I’ve been looking around to fine some kind of tutorial or guide on how to make a dragging door mechanic and The only ones I’ve found are an UE4 Matt Aspland tutorial that has a lot of steps that don’t exist in the way he shows and a Ex Anima Games UE5 tutorial that is perfect except for the fact He’s editing an already fully make blueprint and doesn’t explain a large portion of it.

I would just like to know how I make a dragging door mechanic, similar to Phasmophobia.

1 Like

Could you post a link to a timestamped video example? Or at least describe how it works, in details.

From 1:25 - 3:54 He explains a very janky way that he had set it up based off of what he found online.
(He was also passing over how he created certain logic like the activate/deactivate events and the OpenDoor event)

Then From 7:20 - 11:40 he shows a much better way of doing it.

Now obviously these parts a written out in plain English and are very easy to follow,
however the issue I’m running into is.

What are the parts that he’s not showing?

The OpenDoor event could be anything, same with the activate and deactivate event.

I was hoping maybe somebody that’s been around the block a few times might know what gaps need to be filled because, I’m not joking when I say this, the whole visual script he writes out is connected to an “OpenDoor” event that is connected to a ton of script that he never goes over.

I’m new to game development so this got me stumped.

www.youtube.com/watch?v=sUS1Ui2xHOs&list=PL2h4ghMGNOGCJx4op9fclc40ElSAW-NVx&index=22&t=1094 s

1 Like

Hey, I just gave it a watch. I think your confusion is the “InputActionDragDoor” Event, or possibly the InputAxisTurn event.

This was created in an older version of unreal engine before the time of enhanced input, so if you are using a new version of unreal the third person character input events will be different and the InputAxis Turn Event will not be there. The DragDoor Event was created with the now depreciated input system in the very beginning of the video.

For the turn rate you would need to get it from EnhancedInputAction IA_Look Action value x

and to make the dragdoor input event you would need to create a new Enhanced Input Action Mapping to handle it. This is a good place to get started understanding that system https://www.youtube.com/watch?v=LEMvJBzjnxI

I was hoping you’d show a vid from the actual game or describe how it’s supposed to work. As in, the ideal end result.


Here’s a door I quickly put together:

  • LMB to push it open
  • RMB to pull it
  • it respects the point of contact - the closer you push / pull to the hinge, the more difficult it is to affect it - so you can open it really slooow if you want…
  • can be pushed open with the player’s body capsule as well
  • works from both sides (can be restricted but needs more script)
  • how much / fast it swings can be configured easily
  • nothing is ticking, using timelines or timers - we’re using constrained physics instead


I’ll leave the largest chunk of the script here just in case:

If you think this could work the way you need, do tell. I can add comments, extra screenshots, some functionality even, mention other bits & tweaks that need to be done to make it work, zip it and attach the project, too. Do tell!


Disclaimer: chances are the above is useless since I don’t know how Phasmophobia door works. But I’ve seen door IRL once. :crossed_fingers:

1 Like

I have a few questions.

You said LMB for push and RMB to pull but, are you able to make it so if the player holds the LMB they can move their mouse to swing open and close the door?

Are you able to take out the player opening it with their body?

Honestly, if both of these things are possible then you hit the nail perfectly on the head (especially since you can restrict the door) This is the cleanest BP I’ve ever seen of this mechanic.

I would love to take you up on that offer, a zip of the project or screenshots of how it works (whatever is best for you) would be amazing.

You are a legend, thank you.

1 Like

Added horizontal mouse swings to open / close instead - each with individual sensitivity. Can be set up for each door instance if needed, too.

Disabled physical interaction on the Character Movement Component - not sure if you need it. It’s a broad stroke, at least for now. No longer sure if you need physically accurate door to start with, but it does feel nice to work them. Give it a go, see how it feels and whether it’s applicable for what you need:

Project link:


If it’s good enough, I’ll pop in later on to comment on the inner workings since that’s the most time consuming part :innocent:

1 Like

I’m beyond Impressed.

I would love to understand the inner workings, in your own time of course, I know you said that it’s the most time consuming part.

This is exactly what I was looking for and it works better than I could’ve hoped. It’s insane how beautifully done it is.

It’s clean, the visual code in concise and easy to read, it works, there are no janky physics, I love this.

I just want to say how appreciative I am because, I was looking at everything I could online that even remotely resembled this mechanic trying to figure it out and I got nothing. Then you come up with the best method for this, It just blows my mind.

Just as a sidebar, Do you have a Youtube or a social that you do UE5 game development on?
The way you laid this out and how good it is, I’d love to follow you while I’m still learning.

1 Like

I do have one more question.

Is there a way to change which way you need to move your mouse for the door to swing open?

From the front of the door you move the mouse to the right for the door to swing open (moving left) and then you’d move the mouse to the left to closed the door (as the door swings to the right)

However from the backside of the door it swings in the same direction as your mouse movement. (left is left, right is right)

I was just wondering if there was a way to keep it consistent on both sides i.e have both sides follow the doors movement.

I can attach a video if you need it, I’m just gonna need a bit of time to figure out how the UE5 recording works lol.
I’ve used video editors and recorders in the past but this one is a bit interesting to say the least.

Yeah, that’d make more sense, fair enough :sweat_smile:

Rejigged the logic a bit, more robust now:

Added a function that determines the direction of the mouse movement in relation to the door’s facing direction:


the inner workings

  • the door mesh is attached to the hinge around which it pivots, the mesh is 100uus and offset by half:

This step :point_up: can be omitted and simplified in the Modeling ModexFormEdit Pivot (or have a properly exported mesh instead, ofc) where you can set the pivot yourself:

image

  • the Door Static Mesh Component simulates physics; but only when it’s awake and Chaos puts it to sleep quickly:

This can be further optimised by detecting the Wake / Sleep events and disabling the motor in the Physics Constraint component.

  • the Physics Constraint component:

It creates a physical dependency between 2 other components.

  • even though we simulate physics, the Physics Constraint component Locked the mesh in place:

  • it can still swing in one axis, limited and offset - play with those 2 values to see how they affect rotations - they’re relative to the aDoor actor (and yes, you can absolutely make revolving supermarket doors with this):

  • the door has a motor that will try to reach Swing velocity of 0 (stop it) with the Strength 4.0 factor.

You get quite a bit of flexibility here. This would produce a door that is easy to operate (Strength 2.0) but also closes after you (Strength 3.0):

Again, massage the values as needed. Some of those settings can (should!) be parametrised and made Instance Editable so you can configure each door separately:

Updated project link:


a Youtube or a social

No YT and antisocial :innocent:, and I feel spread thinly already, mostly hang around the forums.

it works, there are no janky physics

Seems fine at the moment. Knowing life and UE physics, chances are you’ll eventually run into an undesired behaviour. Most kinks can be ironed out, though.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.