 |
|
hello, i am pm
Join Date: Jan 2004
Location: Canalization
|

01-07-2006
, 03:47
|
#4
|
Well, that's a tough one because I misunderstood the question.
However I think that's possible as well.
We can use the function I posted to compute the angles. Then, we can set the NPC's yaw to the computed yaw value. We can safely ignore roll (because roll usually isn't associated with a looking-to computation and vec_to_angle should return 0 for it anyway). The problem is pitch - how can set the pitch of the head of the npc? I've looked at models from HL1 (barney, gman) and from cs 1.5 (hostage) and both only have controllers for setting the left-right rotation (yaw) of the head. So I'm afraid we can't set the pitch.
Anyway, so we can set the rotation of the head. If you want to use this instead of setting the model's yaw angle directly, play around with the EV_BYTE_controller1 entvar.
__________________
hello, i am pm
|
|
|
|