Raised This Month: $ Target: $400
 0% 

set_tr help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Enigmaya
Member
Join Date: Aug 2005
Old 10-22-2005 , 06:32   set_tr help
Reply With Quote #1

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 ?
__________________
==Enigma==
If you believe in Light, it's because of Obscurity
If you believe in Joy, it's because of Sadness
And if you believe in God, it's because of the Devil !

==蜻 蜓==
Enigmaya is offline
Send a message via MSN to Enigmaya
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-22-2005 , 19:21  
Reply With Quote #2

I'm guessing that vecEndPos will be what the TraceLine expects to be the point of collision.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Enigmaya
Member
Join Date: Aug 2005
Old 10-23-2005 , 03:43  
Reply With Quote #3

Quote:
Originally Posted by XxAvalanchexX
I'm guessing that vecEndPos will be what the TraceLine expects to be the point of collision.
guess? e... so how to use it ?


PS: thank you. you had answerd me many questions. +karma
__________________
==Enigma==
If you believe in Light, it's because of Obscurity
If you believe in Joy, it's because of Sadness
And if you believe in God, it's because of the Devil !

==蜻 蜓==
Enigmaya is offline
Send a message via MSN to Enigmaya
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-23-2005 , 17:02  
Reply With Quote #4

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.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Enigmaya
Member
Join Date: Aug 2005
Old 10-24-2005 , 00:52  
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX
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.
i know.but can i change the end position use set_tr ?

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
__________________
==Enigma==
If you believe in Light, it's because of Obscurity
If you believe in Joy, it's because of Sadness
And if you believe in God, it's because of the Devil !

==蜻 蜓==
Enigmaya is offline
Send a message via MSN to Enigmaya
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-24-2005 , 01:44  
Reply With Quote #6

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.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Enigmaya
Member
Join Date: Aug 2005
Old 10-25-2005 , 01:50  
Reply With Quote #7

Quote:
Originally Posted by XxAvalanchexX
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.
o。。。so use set_tr() can't change the second origin of the traceline ?

how to change the traceline? is there another method to do this ?

thank you again.

__________________
==Enigma==
If you believe in Light, it's because of Obscurity
If you believe in Joy, it's because of Sadness
And if you believe in God, it's because of the Devil !

==蜻 蜓==
Enigmaya is offline
Send a message via MSN to Enigmaya
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode