Raised This Month: $63 Target: $400

TR_TraceHullFilterEx only hitting world

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Join Date: Sep 2016
Location: Portland Oregon
Old 10-15-2019 , 23:11   TR_TraceHullFilterEx only hitting world
Reply With Quote #1

I'm trying to get prop_physics entities in a short radius from the player by using a TraceHull, but for some reason the TraceHull never finds anything even if I set the mins and maxs to a ridiculously high amount. The TR_GetEntityIndex is always returning 0.

public bool:IncludeProp(entity, contentsMask) {
    new String:EntClass[32];
    GetEntityClassname(entity, EntClass, 32);
    return (StrContains(EntClass, "prop_physics") == 0);
new Float:plyPos[3];
GetClientEyePosition(client, plyPos);

new Handle:NearbyEnts = TR_TraceHullFilterEx(plyPos, plyPos, {-415.0, -415.0, -415.0}, {415.0, 415.0, 415.0}, MASK_PLAYERSOLID, IncludeProp);

if (TR_DidHit(NearbyEnts)) {
	int prop = TR_GetEntityIndex(NearbyEnts);
	if (prop > 0) {             
		PrintToChat(client, "Test");                    
Ethorbit is offline

Thread Tools
Display Modes

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 05:00.

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