these are the steps.
you can find way or source to get them in other threads;
1. get the player's location; //locationVec
2.get the monster's location or anywhere's location//wayPointVec
3.get the interface of IVEngineClient;//iEngineClient
This is the source.
float angle = (float)(atan2((double)(locationVec->y - wayPointVec.y),(double)(locationVec->x - wayPointVec.x))/M_PI * 180);
if(angle >= 0)
{
angle = angle -180;
}
else
{
angle = angle + 180;
}
//You can TODO: set angle for z,
iEngineClient->SetViewAngles( QAngle((vec_t)0, (vec_t)angle,(vec_t)0));
use binding "+cam_control_key_autotarget" "-cam_control_key_autotarget"
Ok,you can look at them directly.