mouse mapping functions
selector from rts_agents project