This should do...

Code:
var temp[3];

// get the direction from the obstacle to the arrow...
vec_set(temp,obstacle.x); 
vec_sub(temp,arrow.x);
vec_to_angle(arrow.pan,temp); // now arrow points to obstacle