Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Getting player head pitch in JK......
Getting player head pitch in JK......
2001-03-20, 9:40 PM #1
Sure wish them MotS verbs were in JK. *sigh*

Anyways, the subject says it all, how can I get the pitch of the players head? The only thing that comes close is GetThingLVec(), but that gives me the vector the thing is looking at. (GetThingRotVel() only works for the Y value) I'm guessing I need to do some VectorAdd or VectorSub with something. I don't say this often, but help!

------------------
-Hell Raiser
"I am not defeated so easily!"
Doin' Xtreme Cogness for DBZ: TDIR
-Hell Raiser
2001-03-21, 6:03 AM #2
You could repedeatley fire a quick-moving projectile from the player and then check its position in front of the player... EAH_Scorpion once made me a cog for player-controllable missiles..it uses a tecnique like that.
No signature for you.
2001-03-21, 7:30 AM #3
If that's a way, then it might look like this.
Code:
proj = FireProjectile(player, ghostStuff, -1, -1, '0 0.01 0', '0 0 0', 0, 0, 0, 0);

vec = VectorSub(GetThingPos(player), GetThingPos(proj));

vec = VectorNorm(vec);

printvector(vec);


------------------
http://millennium.massassi.net/ - Millennium
2001-03-21, 10:19 AM #4
aha! Thanks guys!

------------------
-Hell Raiser
"I am not defeated so easily!"
Doin' Xtreme Cogness for DBZ: TDIR
-Hell Raiser
2001-03-21, 8:51 PM #5
Yeah thats what my controable missile code uses ...


if (VectorLen(GetThingVel(seeker)) > 0.0) AddThingVel(seeker, VectorScale(GetThingVel(seeker), -0.1));
ApplyForce( Seeker, VectorScale( GetThingLVec(Seeker), 0.06 ) );
lookvector = FireProjectile(player, bullet, nothing, 0, '0.0135 0.1624 0.0', '0 0 0', 1.0, 0, 30, 5);
ParseArg(lookvector, "collide=0");
Vec = GetThingLVec(lookvector);
SetThingLook(seeker, VectorSet(VectorX(Vec), VectorY(Vec), VectorZ(Vec)));

Sorry about some of the other stuff thrown in there.
2001-03-21, 9:35 PM #6
You seem to have the easier way.

Code:
proj = FireProjectile(player, ghostStuff, -1, -1, '0 0.01 0', '0 0 0', 0, 0, 0, 0);

SetThingLook(someThing, GetThingLVec(proj));


Seifer, btw you should use SetThingCollide(lookvector, 0); for stability, than ParseArg.

------------------
http://millennium.massassi.net/ - Millennium

↑ Up to the top!