I made a little code a few months ago:

Code:
VECTOR vec1;
ANGLE ang1;

while(1)
{
vec_set(vec1,vector(mouse_pos.x,mouse_pos.y,10000));
vec_for_screen(vec1,camera);

my.skill1=c_trace(camera.x,vec1.x,IGNORE_SPRITES + IGNORE_MODELS);

vec_to_angle(ang1,vector(vec1.x-camera.x,vec1.y-camera.y,vec1.z-camera.z));
my.x=camera.x-(-my.skill1)*cos(ang1.tilt)*cos(ang1.pan);
my.y=camera.y-(-my.skill1)*cos(ang1.tilt)*sin(ang1.pan);
my.z=camera.z-(-my.skill1)*sin(ang1.tilt);
wait(1);
}



The my-Pointer has the position of the mouse on your level.
Now you can let your player look on it. (with Trigonometry or sth. like this)
Hope, I didn't forget to copy something from my script.
That was it, what you was looking for, right?
Best wishes, Hopfel


Hilf mir, dir zu helfen!