View Single Post
Re: Bug in botmans changepitch function
Old
  (#3)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Bug in botmans changepitch function - 16-04-2004

The pitch of your view angles (v.v_angle) is inverted from the angle of the vector from your origin to your enemies origin. The view pitch is also 1/3 of the angle between the enemies origin and your origin, thus...

Code:
Vector v = (enemy.origin - my.origin);
angle = VectorToAngles(v);
view_pitch = (-1 * angle.pitch) / 3;
botman
  
Reply With Quote