Geographic routing is an effective routing technique in wireless sensor networks based on locally available position information. It uses greedy forwarding whenever possible. When greedy forwarding is impossible, it changes to detouring mode to find a detour to a node where it can switch back to greedy forwarding. Routing in detouring mode is usually complex and may result in lengthy paths. To shorten the path and reduce the chance of routing in detouring mode, anchor-based geographic routing has been proposed, which aims at using some anchor nodes as intermediate destinations to reduce lengthy detouring. In this paper, we propose to obtain the anchor list based on the projection distance of nodes in detouring mode with respect to the virtual line linking the source and destination. It is shown that our algorithm outperforms existing anchor-based routing algorithms, with shorter paths and fewer anchors in random network topology. Simulation results are provided to validate the claims.