You could also use this.

VECTOR temp;

vec_set(temp, player.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan, temp);

my.tilt = 0;