Picking in 2D

This fixes #1360. Its a branch from #1359 so that should be merged first.