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

TR_TraceRayEx broken?


Post New Thread Reply   
 
Thread Tools Display Modes
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-19-2017 , 06:05   Re: TR_TraceRayEx broken?
Reply With Quote #11

You are assuming your drawn beam reflects what you think is happening. It is not.
I use trace all the time, and it always works as expected.
You need to understand how it works, and do proper vector maths, in proper situations.

Trace will always hit if it is infinite, it will hit the void if nothing else.
I can tell you do not understand as you are checking that, and using EX when you could just be using the global result.
Your end position may be the result of it hitting the void out in the boonies, and your drawn beam just connects the origin to that meaningless endpoint. This is the most likely conclusion, as a tempent beam will not draw in the void, but will through all visleafs.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 02-19-2017 , 09:04   Re: TR_TraceRayEx broken?
Reply With Quote #12

Quote:
Originally Posted by friagram View Post
You are assuming your drawn beam reflects what you think is happening. It is not.
I use trace all the time, and it always works as expected.
You need to understand how it works, and do proper vector maths, in proper situations.

Trace will always hit if it is infinite, it will hit the void if nothing else.
I can tell you do not understand as you are checking that, and using EX when you could just be using the global result.
Your end position may be the result of it hitting the void out in the boonies, and your drawn beam just connects the origin to that meaningless endpoint. This is the most likely conclusion, as a tempent beam will not draw in the void, but will through all visleafs.
Thanks for the thoughts. But everything you described it done right in my snippt.

My assumption of the Beams and VectorMath is correct to 100%

The solution is that I'm using the wrong starting position (had it right in the draw but not ray)
PHP Code:
Handle trace TR_TraceRayFilterEx([B]targetPos[/B], beamAnglesMASK_VISIBLERayType_InfiniteTraceRayNoPlayersclient); 
__________________
Notable Projects:
Event Item Spawner | Scissors, Rock, Paper for ZephStore
tVip | Smart Link Remover
PLG & GGC - CS:GO Roleplay

and countless more...

I can make a helicopter shoot missles if you want me to...

Last edited by Totenfluch; 02-19-2017 at 09:05.
Totenfluch is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-19-2017 , 18:24   Re: TR_TraceRayEx broken?
Reply With Quote #13

So the beam was not representing what was happening because you did the wrong math (used wrong variable). Sounds exactly like what I said.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 02-19-2017 , 18:24   Re: TR_TraceRayEx broken?
Reply With Quote #14

Quote:
Originally Posted by friagram View Post
So the beam was not representing what was happening because you did the wrong math (used wrong variable). Sounds exactly like what I said.
okay... the beam did not represent the ray.... But the math was right <.<
__________________
Notable Projects:
Event Item Spawner | Scissors, Rock, Paper for ZephStore
tVip | Smart Link Remover
PLG & GGC - CS:GO Roleplay

and countless more...

I can make a helicopter shoot missles if you want me to...
Totenfluch 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 10:27.


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