Line trace ignores specific mesh

I have a line trace from the player camera to detect if the player is looking at a weapon. The line trace returns all the objects around this weapon, but passes through the weapon as if it isn’t even there.
I have played with the trace channels and nothing seems to work.


You can see it working as described in the first picture.
The second picture, the player’s line-trace settings are on the left, and the weapon’s collision settings are on the right. These screen captures were taken during paused play.

I can’t figure this out. Any and all help would be much appreciated!

Trace Complex is off. So are you certain it has a collision primitive?

The line trace is set to ignore the actor that is doing the trace. Is the weapon it’s own actor in the world and not attached to the character actor?

The weapon mesh is part of a weapon blueprint that was attached to the turret. When it spawns in the level, I spawn the weapon and attach it to the turret weapon socket the same I would for attaching a weapon to a character socket.
Does a static mesh NEED a collision primitive? A static mesh set to “block visibility” can’t block that channel on it’s own? Lol, then what’s the point of having that little check box there in the first place. I’m assuming I’m the idiot and I’m missing something simple. But so far, I have followed all the rules for trace channels and it still doesn’t work.

So, not solved, but I made a workaround. I added in a collision mesh to act as the trace collision detection. Still can’t black the visibility channel in the line trace, but I at least have a functioning mechanic now.

If anyone comes up with a fix to the “mesh not blocking trace channel even though it is clearly marked as ‘blocking’”, please let me know.

You can change the collision settings on any actor regardless of how their collision mesh is set up. UE won’t warn you that they don’t necessarily have a collision primitive because you can do collision testing on the original mesh with “Trace Complex”.

I still feel the need to clarify the attachment setup. Your Trace has an array called “Actors to Ignore”, and is referencing an array of actors and also a reference to “self”. So we need to make absolutely sure that this weapon is not in that array. If you are doing this Trace from the player Pawn and the weapon is attached to the player pawn, then I believe that the weapon is being counted as “self”. You can test this by removing Self from Actors to Ignore. Or when you spawn it, don’t attach it like that.

Thank you so much for the suggestions. I really do appreciate all of it.
Even though I have a workaround in place, I’m still curious to figure out the potential issue. I’ve tried everything I can think of and everything the internet has suggested. I did indeed detach the “self” node and it didn’t solve anything. I ticked the “complex trace” and still didn’t work.
The static mesh doesn’t block/overlap the “visibility” or “camera” trace channels.
Let’s close this since A) I have a workaround, and B) I am sure I will figure out my error later down the road.
Thanks for all the suggestions!