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

TR_GetPlaneNormal


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nail
BANNED
Join Date: May 2008
Location: PetrovЪ GradЪ
Old 11-13-2011 , 05:45   TR_GetPlaneNormal
Reply With Quote #1

If the point is on the "wall" TR_GetPlaneNormal returns normal vector to the collison plane of a trace
If the point is in free space TR_GetPlaneNormal returns normal[0] = 0.0 normal[1] = 0.0 normal[2] = 0.0
How do I know managed to get TR_GetPlaneNormal normal vector or not?

0 0 0 can also be the correct result
Nail is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 11-14-2011 , 19:48   Re: TR_GetPlaneNormal
Reply With Quote #2

come on, you answered yourself. use TR_DidHit to see if the trace collided with something, if it did then you would get the correct result.

Last edited by blodia; 11-14-2011 at 20:26. Reason: reworded to sound less aggressive lol
blodia is offline
Nail
BANNED
Join Date: May 2008
Location: PetrovЪ GradЪ
Old 11-15-2011 , 07:12   Re: TR_GetPlaneNormal
Reply With Quote #3

In some cases TR_DidHit returns wrong results.
For example, ZM_Christmas_city skybox
Nail is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 11-15-2011 , 09:33   Re: TR_GetPlaneNormal
Reply With Quote #4

well depending on what flags you use it may not be the wrong value, traces will collide with anything whether you can see it or not. even if it does you can still use the other trace natives like TR_GetFraction, TR_GetEndPosition with TR_GetPointContents, TR_GetEntityIndex etc. there are many ways to check if you hit something.
blodia 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 14:11.


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