How do I hit a func_brush which isn't solid (and is textured with nodraw) with a trace?

I have no idea how to do this. The part about masks on this page doesn’t really help me. Any ideas?

A custom trace with **[Util.PointContents](**?

Edit : Yeah nevermind, dumb idea.

Just returns CONTENTS_EMPTY :saddowns:

And of course you have no way to know beforehand where said brush will always be?

I do, actually. I just want to hit an invisible, not solid brush which is always in a set place.

The face that is covered in nodraw will not exist.


No matter what you try to do, the only thing that will work (Theoretically) is comparing co-ordinates.

What would happen if I textured it with tools_invisible?

It would be compiled, therefore would exist.


Might work.

Invisible works, but then it’s solid again…
I also tried playerclip, but then the trace doesn’t hit it…

Maybe I should just do calculations. I will just tell what I want to do: I want to be able to hit a large, imaginary plane by using the trace mentioned in the OP, but since using traces is a bitch I’ll have to calculate the position on the plane. But I have no idea how to do this…

You could always set it to func_illusionary. Though, I’m not sure if that would work for what you’re wanting.

Found something interesting.

But my limited math knowledge doesn’t know how to translate this math language to Lua :crying:


Perhaps I can figure this out myself:

That might sound dumb, but can’t you just place a SENT there that is invisible and no-collides with everything? Traces would still hit it.

OK, I will explain it with a diagram. Because a diagram makes everything 100x clearer.

See where I’m going here? In my situation, the trace goes right through the plane and hits the skybox instead. Placing a SENT there wouldn’t be a perfect solution. The box’s width & height almost touch the Hammer grid.

Try setting the brush’s collision group to GROUP_DEBRIS_TRIGGER

Nope, although the trace hits it, the brush is still solid.

Odd. The brush should only collide with debris.

Wait, it DOES work, I made a typo. FINALLY! :buddy: Thanks a ton!

You know you probably could not do it hackily by: Trace first without any checking against the imaginary plane. If the trace hit’s about the plane’s y you know it can not hit the plane. Then do the math for a ray/plane intersection test. Then you don’t need to hack about with brushes, etc.

use a solid func_brush with a given name, then locate it and set some kind of flag (.nocollide or w/e) on it in InitPostEntity() and then make shit not collide if it’s got the flag in ShouldCollide()?

That’s a pretty clever idea actually, but my current solution seems to work fine.