get at player's view angles ? -
26-05-2005
Hi lads,
Does any of you know how to get at a player's VIEW angles in HL2 ? (not only bots, but players in general). I've tried GetCollideable->GetCollisionAngles () on the edict but it always returns me a null vector (though GetCollisionOrigin () works, weird).
And if you know how to get to any angle at all (i.e. body angles too) I'm interested to know as well.
I'm writing, er... trying to write, the RACC interface for HL2.
*edit*
Har! found it in the HPB_bot2 source code.
playerinfomanager->GetPlayerInfo (pPlayerEdict)->GetAbsAngles ()
this is for the view angles. Now for the body angles, I'm still asking...
*edit*
after some testing it appears GetAbsAngles () get at the BODY angles, not the view angles. When the player is standing on his feet, the pitch is always zero (no matter whether he looks up or down). The yaw is correct though.
Now I still want the view angles. Any ideas or do I need to re-subscribe to HLCoders ?
RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
Last edited by Pierre-Marie Baty; 27-05-2005 at 01:42..
|