Page 1 of 1
help with Darkplaces changepitch ()
Posted: Thu May 23, 2013 12:33 am
by frag.machine
HELP ME I AM A TOTAL NOOB
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 ?
Re: help with Darkplaces changepitch ()
Posted: Thu May 23, 2013 12:51 am
by Spike
vectoyaw is a crippled version of vectoangles, in that it only returns the yaw angle and ignores the pitch+roll angles.
Re: help with Darkplaces changepitch ()
Posted: Thu May 23, 2013 2:55 am
by r00k
fixme:
Re: help with Darkplaces changepitch ()
Posted: Fri May 24, 2013 2:30 am
by frag.machine
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