The main objective of this code sample is to explain how to write an AI for enemy player to detect and avoid obstacle easily using Physics.RayCast. - See more at: http://www.theappguruz.com/tutorial/unity-3d-enemy-obstacle-awarness-ai-code-sample/#sthash.PaflC8Br.dpuf