Raised This Month: $51 Target: $400
 12% 

Traceray Ignore Solids


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CowGod
Senior Member
Join Date: Feb 2015
Old 01-27-2018 , 05:39   Traceray Ignore Solids
Reply With Quote #1

Hey guys, I am having a issue where my traceray is hitting solids even though my filter is setup to only look for players. I have tried nearly every mask and even set the filter to return false if entity is 0. Any help would be appreciated.

PHP Code:
float vOrigin[3], AnglesVec[3];
GetClientEyePosition(client,vOrigin);
GetClientEyeAngles(clientAnglesVec);
        
Handle trace TR_TraceRayFilterEx(vOriginAnglesVecMASK_SHOTRayType_InfiniteTraceRayDontHitSelfclient); 

PHP Code:
public bool TraceRayDontHitSelf(int entityint maskany data)
{
    if(
entity == 0)
        return 
false;
    else
        return 
entity != data && entity <= MaxClients;

CowGod is offline
Send a message via Skype™ to CowGod
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 01-27-2018 , 08:02   Re: Traceray Ignore Solids
Reply With Quote #2

You can't force a trace ray to go through walls. Sourcemod trace ray doesn't allow that, your filter won't change it.
The only way to make a trace ray go through solids is set its type to TRACE_ENTITIES_ONLY, but you can't do that.
You should wait for this pull request to land and use the new trace ray functions:
https://github.com/alliedmodders/sourcemod/pull/754
What you are trying to do is currently impossible.
__________________
Benoist3012 is offline
CowGod
Senior Member
Join Date: Feb 2015
Old 01-27-2018 , 13:59   Re: Traceray Ignore Solids
Reply With Quote #3

Alright, thanks for the info.
CowGod is offline
Send a message via Skype™ to CowGod
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 19:24.


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