Driver: How to I create a driver for door lock that is opens and closes base on the door handle angle(+/- degrees)? I have been trying to create a driver for the doorTypeOneBarBig that will lock it and unlock it base on the rotation of the doorTypeOneHandle. The doorTypeOneBarBig should be in the lock position(push outward) when the doorTypeOneHandle is at 0 degrees. The doorTypeOneBarBIg should be in the unlock position(push inward) when the doorTypeOneHandle is at either 45 or -45 degrees. I have attached the blend file in the link GithubRepoBlendFile. Will someone please download the blend file and take a look at it. I have already spent 5 hours trying to figure it out myself. Please help. ;(
First you need to remove the Limit Location Constraint from your &quot;Bar&quot; object. This prevents it from moving along the Y axis.
Next select your handle, right click into the X rotation and select Copy As New Driver
Right click into the Y location of the &quot;Bar&quot; object and choose Paste Driver. Right click again and choose Edit Driver. Set the Evaluation to Scripted Expression and change it to (abs(degrees(rot))-45)*0.0002-8.626. (Might need to change it if you want exact values). It should look like this :

No need to tweak the F-curve properties unless you want a special interpolation.
Result :