I tried this in POD-Bot, I'm not sure I'm doing this in correct way but the aiming still mess up if I don't clamp it:
PHP Code:
Vector v_deviation = vecDirection - pev->v_angle;
ClampAngles (v_deviation);
float k = 5;
float d = 2;
pev->yaw_speed += g_flTimeFrameInterval * (k * v_deviation.y - d * pev->yaw_speed);
pev->pitch_speed += g_flTimeFrameInterval * (k * v_deviation.x - d * pev->pitch_speed);