How to implement 2D Ai Wandering with 8 - directional movement using Perspective Images in unity 4.3 ???

Hi,
My requirement is to move a 2D characters with perspective view images has to wander in game area by choosing dynamic path and according to that the AI character has to switch the
animations based on its current direction and Ai character has to get collision between Ai Character, Ai and Player Character , Ai to Static Obstacles, Moving Obstacles …

What i done till now is , AI chooses the random Way point and based on its direction it switches the animations and using Ray-cast AI detects the collision with static obstacles, but the problem here is with the Moving Obstacles since AI is casting the ray in one direction, some times AI character was walking on the obstacles like moving cars …

So please tell me how to solve this problem ??? Thanks in advance

For Better UnderStanding I am giving you the link of what i done so far . If you observe we can find the AI character flickering (that was due to repeated call for choosing new way point )

Here is Link
https://dl.dropboxusercontent.com/u/70903877/SuicideBomber/Build.html

You could a trigger sphere collider attached to the player so when the car enters the collider, you perform an action.

You could get the car to slow down, and the character to either stop if the car is on the front or speed up if he is about to get hit.