Raised This Month: $32 Target: $400
 8% 

Get trace position inside filter function during the collision


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-25-2018 , 15:47   Get trace position inside filter function during the collision
Reply With Quote #1

Is such thing possible? Whenever the trace hits an entity locate the position of the trace?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-25-2018 , 18:45   Re: Get trace position inside filter function during the collision
Reply With Quote #2

You probably have to end the trace. Get the end point and start a new trace from the previous end point with the same angles.
__________________
Neuro Toxin is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 09-26-2018 , 01:30   Re: Get trace position inside filter function during the collision
Reply With Quote #3

TR_ClipCurrRayToEntity from SM 1.10 might work here.
PHP Code:
bool FilterFuncint entity )
{
    
TR_ClipCurrRayToEntityMASK_ALLentity );
    
float pos[3];
    
TR_GetEndPositionpos );

    return 
true;

Haven't tested this myself though. If it doesn't work then you should consider using TR_EnumerateEntities (also from SM 1.10).

Last edited by hmmmmm; 09-26-2018 at 03:07.
hmmmmm is offline
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 17:02.


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