Hello. I’ve been using the Physics Constraint Component to drive my door’s open and close state. At first the doors does not appear on the scene because the orientation is a bit screwed. On Begin Play I set the door mesh simulate physics to false and set the relative rotation to Rotator Zero when the starting state is Closed
I suspect a collision related issue between the door and the frame. When physics objects are intersecting on begin play, a large depenetration impulse is applied to them, and you may see some taking strange positions or even flying away. After a while the constraint is able to do its job of bringing the door back in place and the door goes back toward the frame but this time from the outside, so it won’t intersect.
You can temporarily remove the constraint and position the door properly within the frame. Then use Simulate to make sure it is not flying away.Once you are happy with the door position, press K during Simulation to save its location to the Details panel. Now re-add the constraint, it should work as expected.
I finally figured at what was causing this. I thought that DoorMesh->GetRelativeRotation() returns the local rotation but it actually returns the world rotation of the component. I get the delta rotator of the DoorMesh rotation and the root component to find the local rotation then add my rotation offset and combine it again with the root component rotation to get the proper value.