Following obiect avoiding other object

I'm using code in actor1
And collision event for object wall of actor actor1
But it's looks like that:

And I want situation like this:

How I can do that?
- Code: Select all
angle = direction(x, y, actor2.x, actor2.y);
directional_velocity = 3;
And collision event for object wall of actor actor1
But it's looks like that:

And I want situation like this:

How I can do that?