i am trying out somthing but maby u can do somthing white this

vec_to_angle (ANGLE* ang, VECTOR* dir);
Computes the pan and tilt angles of a direction vector, and places them into the pan and tilt parameters of an Euler angle. Very useful for trading an angle for a direction, thus computing the angles to a target.
Parameters:
ang Euler angle to be calculated.
dir direction vector.

Modifies:
ang

Speed:
Fast
Example:
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
}
See also:

Last edited by flits; 08/16/07 20:04.

"empty"