set_tr help
use this in "traceline".
but didn't how to use the TraceResult?? { TR_AllSolid, TR_StartSolid, TR_InOpen, TR_InWater, TR_flFraction, TR_vecEndPos, TR_flPlaneDist, TR_vecPlaneNormal, TR_pHit , ----------// only know this TR_iHitgroup, }; set_tr(TR_vecEndPos,vec) --------//use right ? |
I'm guessing that vecEndPos will be what the TraceLine expects to be the point of collision.
|
Quote:
PS: thank you. you had answerd me many questions. +karma :D |
Let's say you trace a line from x to z.
x-----|----z Oh no, a wall is in the way! Since the line couldn't trace all the way to z without an obstacle, we return the origin of where it did get to, in this case it would be at |. It has limited application. |
Quote:
i want to change the Traces where a player is aiming. this set_tr(TR_pHit,pentToSkip) make users shoot themselves , i guess this is change the endpos back to player. so if i change the position of z, the trace will be changed ? change this : x-------z to: z | | | x |
TR_pHit is the entity that was hit by the TraceLine. pentToSkip is the entity that should be ignored by the TraceLine. Since the start of the TraceLine is usually a player's origin, if you didn't skip him then it would always return him as hit no matter what since he is standing on top of the start of the line.
I'm not 100% sure, but I don't think vecEndPos is the second origin of the TraceLine, it's just where the collision occurred. |
Quote:
how to change the traceline? is there another method to do this ? thank you again. :P :P |
| All times are GMT -4. The time now is 23:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.