spawn object at closest valid point

EQS would be the simplest method if your not comfortable creating your own search algorithm.