Hi
Please use [*code] you code here [*/code] tags (without *) to post your code, it will be more readable.
About the code, there is an example how to rotate object to any position (camera as well), in the manual.
Take a look here:
vec_to_angle (ANGLE* ang, VECTOR* dir); And this is how the code looks like:
function turn_towards_target()
{
// 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
}
Best regards!