Raised This Month: $ Target: $400
 0% 

EngFunc_TraceHull and TR_vecPlaneNormal


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vitorrossi
Senior Member
Join Date: Apr 2012
Location: NY, USA
Old 10-14-2015 , 09:19   EngFunc_TraceHull and TR_vecPlaneNormal
Reply With Quote #1

I use the following code for when a player is stuck in a wall:

PHP Code:
new Float:fOrigin], Float:fNormalVector], trHull;
    
    
trHull create_tr2( );
    
pevidpev_originfOrigin );
    
    
engfuncEngFunc_TraceHullfOriginfOriginDONT_IGNORE_MONSTERSHULL_HUMANidtrHull );
    
    
get_tr2trHullTR_vecPlaneNormalfNormalVector )
    
    
free_tr2trHull 
returns fNormalVector[0] = 0.0, fNormalVector[1] = 0.0, fNormalVector[2] = 0.0
If doing so with a traceline, you actually get the normal vector corresponding to the plane the traceline hits.

How come this is not the case for tracehull, can it be shown from the HLSDK? Is there a way to retrieve the normal to the plane tracehull hits?
vitorrossi is offline
 



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 22:12.


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