How to get closest point between 2 objects?

My method works with physics objects and static mehses. If it is a static mesh, just leave the bone parameter as “none”.