help with Darkplaces changepitch ()

Discuss programming in the QuakeC language.
Post Reply
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

help with Darkplaces changepitch ()

Post by frag.machine »

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)
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: help with Darkplaces changepitch ()

Post by Spike »

vectoyaw is a crippled version of vectoangles, in that it only returns the yaw angle and ignores the pitch+roll angles.
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: help with Darkplaces changepitch ()

Post by r00k »

fixme:
;)
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: help with Darkplaces changepitch ()

Post 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
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Post Reply