function turn_towards_target()
{
while(1)
{
// get the direction from the entity MY to the entity YOU
vec_set(temp,your.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp); // now MY looks at YOU
camera.x = you.x - 90; // distance in x direction away from ball
camera.z = 60; // height of camera
}
}
You can use this if you also want the camera to follow the movement