# Physics Door - hinge constraint is loose; door won't latch

Hi,

I have a physics door similar to the doors in Amnesia. It’s set up with a physics constraint attached to the frame constraining the door itself. The constraint allows for Z rotation only, limited to a 150-degree arc.The hinges are lined up at the pivot point, but do not have collision themselves. I control the door with a physics handle that attaches where I’m looking and extends/retracts based on the camera Y rotation. It works pretty good.

I have two issues with the door right now.

1 - The physics constraint is loose. If I stand in the door and close it on myself (or on another object in the door), the door pulls away from the hinge. Video to illustrate:

I need the hinge to stay solid, regardless of what other forces act on the door.

2 - The second issue is closing the ■■■■ thing. It latches (turns off physics, sets rotation to close) when it senses the door is closed enough. I have tried calculating the door angle both as a raw angle and (currently) as a dot product, and I’ve tried the latch function to occur as both a response to the door angle and as a volume trigger set in the frame. Neither seem to work reliably, because if the door is slammed shut quickly the door may bounce right off the frame and fail to latch.

Right now, I have an angular motor set to close the door when it’s within a few degrees (I’ve also tried a physics thruster and a timeline), which catches and closes the door on most hard closes, but it still occasionally can bounce without latching. I’m trying to figure out a system where no matter how hard you close the door, it STAYS CLOSED without bouncing. I know the “soft constraint” angular swing limit is what’s creating the bounce, but I want it to be a soft constraint on the open limit and a hard constraint on the closed limit. I can’t see how to accomplish this with blueprint.

Thanks always for any help!