View Single Post
Re: The f____ shield. How to get bots to deal with it?
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: The f____ shield. How to get bots to deal with it? - 21-01-2004

Everything that has "angles" in its name is a variable which describes NOT a location, but an angle. The Vector type mostly serves as a placeholder. The X Y and Z parts are used this way :

X : stores the PITCH (vertical looking angle) of a model
Y : stores the YAW (horizontal looking angle) of a model
Z : stores the ROLL (i.e, how much the model is "bent" relatively to the vertical axis - DO NOT USE THIS)

Player and monster models distinguish the BODY angles (pEdict->v.angles) and the VIEW angles (pEdict->v.v_angle). The body angles determine where the model's body is facing, while the view angles determine where the model's head is LOOKING. A player's view point is ALWAYS relative to his v_angle (view angle). By knowing the origin, eye position and view angle of a player you can tell EXACTLY what is the player's point of view in the game at some instant t.

[edit] I thought you already used the angles a lot when you implemented the bot aiming thingy in the mEAn mod ? Anyway, if you are curious to see what the pEdict->v. things are for, make an entvars dump of an entity in the game using my PMTools plugin and look at the results. I *always* have this plugin runnning, I can't develop anything without. Or make your own similar plugin, at your choice...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 21-01-2004 at 00:33..
  
Reply With Quote