--
[ Picked text/plain from multipart/alternative ]
Hey all,
I've been trying to set up a tracer to fire from a second muzzle (working on
dual pistols). I've tried for ages today to try and get the vector of the
muzzle and had no success using every method I've tried.
The closest I've gotten is using this code

int RMuzzleAttachment = LookupAttachment( "muzzler" );
Vector vecMuzzlePoint;
QAngle vecMuzzleAngles;
GetAttachment( RMuzzleAttachment, vecMuzzlePoint, vecMuzzleAngles );

vecSrc = vecMuzzlePoint;
}
vecAiming = pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
pPlayer->FireBullets( 1, vecSrc, vecAiming, vec3_origin, MAX_TRACE_LENGTH,
m_iPrimaryAmmoType, 2 );

Returning vecSrc Vs Weapon_ShootPosition gives me something along the lines
of
vecSrc - Z Y X -760.305359 -262.641357 -413.379333
Weapon_ShootPos - Z Y X -703.968750 -256.000000 -448.000000

So for some reason the vectors that end up being returned are slightly off
by a fair bit. Using Weapon_ShootPosition works fine for the right pistol

Any suggestions or ideas? My vector maths in 3d is pretty shoddy, I've only
really covered it in 2d at school.

Thanks,
Matt Stafford
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to