If I remember correctly the z axis will not always be appropriate if the offset is in relation to something, such as EyeVectors. Pretty sure weapon_rpg.cpp does an EyeVector related offset, I can check when I get home from work.
Daniel Soltyka [EMAIL PROTECTED] Sent from my iPhone On Oct 13, 2008, at 7:48 PM, "Jonas 'Sortie' Termansen" <[EMAIL PROTECTED] > wrote: > If you want to lower a vector, simply decrease the .z value? > > ----- Original Message ----- > From: "Luke Smith" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Tuesday, October 14, 2008 1:23 AM > Subject: [hlcoders] Using vectors to offset. > > >> Can someone explain to me how to use vectors to offset things like >> attachments. >> The code I'm looking at looks like this; >> >> >> Vector forward, right; >> >> CBasePlayer *pPlayer = ToBasePlayer( this ); >> >> pPlayer->EyeVectors( &forward, &right, NULL ); >> >> *pVecTracerStart = vecShotSrc + Vector ( 0 , 0 , -4 ) + right * -5 + >> forward >> * 45; >> >> >> >> So adjusting the number on the bottom like "45" has an effect and >> offsets >> the attachment forwards. But what if I want to move it down for >> instance? >> Ive tried putting Vector forward, right, down; and so on but it has >> no >> effect. Anyone? >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list >> archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

