It uses pathfinding.
I found the cell size was too big and thats why worker was too far away from objects. Reading manual helps sometimes..
Now only remains the issue that worker gets stuck to home after trasferring gold to home. It doesn't go to gold mine again.