I have a monster sending out a traceline, and when the traceline is interupted by a wall i want the monster to face the wall at the correct angle. ive tried many combinations of vectoangles and trace_plane_normal. Is their something i didn't do right?
traceline (self.origin + '0 0 20', self.origin + '0 0 20' + v_forward*50, TRUE, self);
if(vlen(self.origin + '0 0 20' - trace_endpos) < 30)
{
self.angles_y = vectoangles(trace_plane_normal);
}