Raised This Month: $ Target: $400
 0% 

Angle to Origin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 01-07-2006 , 03:47  
Reply With Quote #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
PM is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode