I added a secondary attack to the 357 (just for testing) in which I find the
wall in front of the gun and find the normal vector of that wall. However,
when I read out the x,y, and z values of this vector, it seems only the y
vector changes. here's the relevant code:
Vector vecSrc = pPlayer->Weapon_ShootPosition();
Vector vecAiming = pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
trace_t tr;
UTIL_TraceLine(vecSrc,vecSrc + vecAiming *
MAX_TRACE_LENGTH,MASK_SOLID,this,COLLISION_GROUP_NONE,&tr);
if(tr.DidHitWorld())
{
Vector vUp = tr.plane.normal;
Msg("%d,%d,%d\n",vUp.x,vUp.y,vUp.z); // only vUp.y changes
}
Thanks,
Kenrick Rilee
(btw i hope i don't sound too much like a noob :/)
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders