Here is the example, not made by me, but by my friend:
Code:
VECTOR temp;

ANGLE temp_angle;

function BotTurnTo(ENTITY* ent,VECTOR* targ_vec,var turning_spd)
{
	vec_set(temp,targ_vec.x);
	vec_sub(temp,ent.x); 
	vec_to_angle(temp_angle,temp);
	if(ang(temp_angle.pan - ent.pan) < -1 | ang(temp_angle.pan - ent.pan) > 1)
	{
		ent.pan += sign(ang(temp_angle.pan - ent.pan)) * 10 * time_step ;
	}	
	ent.tilt = 0;
	ent.roll = 0;
}


Sorry for double post wink


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung