One solution is to use a driver on the door (and little trigonometry )
In the following example, the driver is on the Z rotation and take X position as input (pay attention at the door’s origin) :
Here is the driver :
The expression must be tuned to suit X size of the door.
Here is the blend file (press space to start animation).
help_door.blend (616.7 KB)
Bob