# How to add a "closed" mechanism for a physics based door

**URL:** <https://forums.unrealengine.com/t/how-to-add-a-closed-mechanism-for-a-physics-based-door/2457492>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 15, 2025, 5:23am UTC](https://forums.unrealengine.com/t/how-to-add-a-closed-mechanism-for-a-physics-based-door/2457492 "2025-04-15T05:23:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 15, 2025, 6:29am UTC](https://forums.unrealengine.com/t/how-to-add-a-closed-mechanism-for-a-physics-based-door/2457492/2 "2025-04-15T06:29:45Z")

</div>

> [@SithHunter](#):
>
> the best solution I’ve thought of is to disable physics when the door reaches a specified rotation and then re-enable it when it is moved more than 1-2 degrees.

But then you cannot move it at all since physics is disabled - is this the issue here?

> [@SithHunter](#):
>
> So far, the only thing I’m missing is a way to have it “click shut” when it reaches the correct rotation so that it stays there until the player clicks on it to move it again.

If that’s the case, enabling / disabling physics could / should work. Not sure how you’re driving the door; if you’re using motors, you could set those to hold the doors in place, like in this example:

> [@How do I make a Phasmophobia door mechanic](https://forums.unrealengine.com/t/how-do-i-make-a-phasmophobia-door-mechanic/1805515/11):
>
> 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 Mode → xForm → Edit Pivot (or have a properly exported m…

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-add-a-closed-mechanism-for-a-physics-based-door/2457492)._
