I feel like I must be missing something really obvious here, but I’ve been going over this for hours and I’m stumped. It seems that no matter how I set up trace responses, only specific actors will ever actually block or overlap a line trace. Is there any reason that an actor would ignore any line trace regardless of what the collision settings are?
Unless the line trace is set to ignore the specified actor through its Actors to Ignore or Ignore Self parameters, a blocking collision should always register a hit. One thing you can check is to make sure if the collision settings for these actors within the level are different from the ones set in the blueprint. This can happen if settings were modified for individual instances of the class.
Can you elaborate on what you mean here? Are you suggesting collision settings that are dynamically set from the actors’ blueprints, or from the blueprint calling the line trace? As far as any method that I’m aware of, the collision settings are all what they should be. I’ve even compared the actors settings against the actors that are able to block traces, and can’t find any differences
You can click on an individual actor in the level, select its collision component and then verify if the trace responses are the same as what you have set in the actor blueprint. Since these settings can be changed for each actor in the level separately, it would be a good idea to make sure everything holds up fine here.
Oh gotcha. Yep, exactly how I’ve been trying to figure this thing out, is just on one or two actors. I’ve checked and double checked that who-knows-how-many times now. It’s the only way I can test it, because it’s seemingly arbitrary which actors can and can’t block hits.
In that case, I’d suggest setting the Line Trace debug option to For Duration. Since it’s happening at random this way you can check if they’re hitting some invisible collision volumes before the actor.
You can press Alt+C in the editor viewport to check for invisible collision volumes.
No dice there either. Here’s a screenshot. Both line traces should be hitting the floor that the player is standing on.
The only other collision test that I can think of right now is the floor mesh itself. Since it is not an actor you created using blueprints, its collision settings will be specified in the static mesh.
You can open up the static mesh asset from the content browser and check if the trace responses are set to block your trace.
I might be misunderstanding you, is this different from what’s already been suggested? To clarify, both the instance, and the inherited static mesh component are currently set to block all trace channels
Ok yea, in that case, that should override the default settings. Are all the actors that don’t register the block using the same static mesh?
No, different static meshes
Did you find a solution?
I am having the same problem
In case anyone is still having this issue like I was I found out the trace was passing through the actor because I had made it too thin. Once I made it thicker the trace started hitting it.
Just in case some else comes across this problem - I had the same issue with some actors being ignored by the trace. Regardless of what type of collision I gave them.
Ticking ‘trace complex’ solved it for me.
Don’t rely on StaticMesh Components collision. Where possible add a child collision component to the mesh for specialized traces.
Won’t need to use Trace Complex.
For the record I have projectiles (PMC) that have a sphere collision component w/ 0.1cm radius reliably hitting a sheet plane at ridiculous speeds and rates of fire.
I’m having a similar issue, however I can’t rely on adding my own collision components to each mesh that this is happening to. There’s just too many of them and they’re too complicated. But in my case even a standard cube you can place in the world isn’t blocking the trace. Only my landscape mesh and static meshes spawned by actors specifically actually block it. Regardless of profile or if I have Trace Complex on.
Okay I solved my problem with Event Tick. It has a tendency to skip certain objects when I only execute the line trace once. I also found out I can’t disable or enable the Event Tick node or it will cause the same problem. The line trace literally HAS to continually run in the background, forever. Or it wont work. I’m very confused, this cannot be good for performance.
This is still not 100% miss-proof, as it seems.
Tick → sequence: then 0 → Branch [true] execute traces
use a bool variable to control whether the trace function gets executed.
sequence: then 1 is used for anything else you want to run on tick.
Also I’d use a custom trace channel or profile for the trace that hits everything you need to.
Project settings → Engine → Collision
I ended up turning Event tick on and off but adding a delay to the off node so it still traces enough for it to not clip through the ground. I realized it also only occured when I was moving my player upwards. Otherwise it hit fine. Would be another way of doing it though! The custom channel is a good idea, thanks!