The movement driver already looks in the direction of the empty, and I want it to accelerate towards it as well. I've tried making a function, adding it to driver namespace, but I still get the "invalid python expression" error. How would i do this properly?
import bpy
def driverFunc(object1, object2, acceleration):
direction = object2 - object1
delta_x = direction * acceleration
value = var + delta_x
return value
bpy.app.driver_namespace['driverFunc'] = driverFunc