Forum

help with Darkplaces changepitch ()

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

help with Darkplaces changepitch ()

Postby frag.machine » Thu May 23, 2013 12:33 am

HELP ME I AM A TOTAL NOOB :D

Anyway, I'm trying to use it in the same way one would use changeyaw(), but since there's no equivalent to vectoyaw() to set .idealpitch, I'm stucked.
Basically, I want an ai_face() that works in both X and Y axis. Directions please ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Re: help with Darkplaces changepitch ()

Postby Spike » Thu May 23, 2013 12:51 am

vectoyaw is a crippled version of vectoangles, in that it only returns the yaw angle and ignores the pitch+roll angles.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: help with Darkplaces changepitch ()

Postby r00k » Thu May 23, 2013 2:55 am

fixme:
;)
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: help with Darkplaces changepitch ()

Postby frag.machine » Fri May 24, 2013 2:30 am

Spike wrote:vectoyaw is a crippled version of vectoangles, in that it only returns the yaw angle and ignores the pitch+roll angles.


hmmm makes sense. Thanks Spike!

EDIT: for anyone willing to make an ai_face() that affects also the entity pitch:

Code: Select all
   local   vector   ideal;

   ideal = vectoangles(self.enemy.origin - self.origin);
   self.ideal_yaw = ideal_y;
   self.idealpitch = ideal_x;  // this one is DP specific
   ChangeYaw ();
   changepitch (self); // this one is DP specific
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest