Shorest distance around a gameobject

http://skitch.com/mpollard/dpcf1/skitched-20100720-183004

I have a game which uses a touch event to move trucks to a station though a array of vectors. The main problem is when you want to park a truck into the station, the station will have only 1 way in so if you drag to the "this point" i want to be able to work out how far each way around to the enterance it is and pick the shorest way in.

Any help in achiving this?

Thanks in advance

I can only make some assumptions and hope that they are correct...

"move trucks to a station through an array of vectors" - you have some kind of nodes and edges your trucks can drive between (streets and street corners)? And your truck is at one node, while the station is at another node?

If thats what you mean, than you may want to take a look at http://en.wikipedia.org/wiki/Shortest_path_problem. Some of the algorithms named there are also to be found as ready-to-use scripts in the unifycommunity, but they are probably overpowered for your problem (they are more thought for things like NPC movement without restriction to streets like your trucks).