LineTrace an Actor set to ECollisionResponse::ECR_Overlap?

Im trying to use LineTrace to get hit data on an Actor that has it’s collision meshes set to BodyInstance.SetCollisionProfileName(“TraceName4”), and SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap).
(TraceName4 = ECC_GameTraceChannel4)

In the trace call Ive set:
FCollisionResponseParams to CollisionResponse.SetResponse(ECC_GameTraceChannel4, ECollisionResponse::ECR_Block)
and have tried:
FCollisionResponseParams to CollisionResponse.SetResponse(ECC_GameTraceChannel4, ECollisionResponse::ECR_Overlap)

I cannot seem to get a hit on the Actor.
I know the trace is happening and that it is properly intersecting with the actor, because I added a DrawDebugLine() along the Trace path and visibly confirmed that it is.

I feel like Im missing something simple.
TraceHits can hit Actors set to ECR_Overlap, right?

sigh
I knew I was missing something simple.
LineTraceSingleByChannel doesn’t do overlaps.
LineTraceMultiByChannel for overlaps. :stuck_out_tongue:

Is there some reason why there isn’t a singular line trace that returns the first overlap hit?

LineTraceSingle returns only the blocking hit, while LineTraceMulti returns everything hit including the blocking hit.


Yes, that is what I discovered.
My question is: Why isn’t there another single line trace variant that returns the first Overlap hit rather than the first blocking hit?
I mean the comment description for the multi line trace function says the results are ordered, so I don’t see why there couldn’t be an “on first overlap” variant…

Epic probably just hasn’t run into that use case very often. You can achieve the same thing with Multi and just returning the first result, there’s some wasted work but it’s not the end of the world.

You could always edit the engine code and add a “first overlap” trace if you think its that important for your project.

It would make sense to have a bool in it, bTraceMultipleObjects, I’m sure a lot of people only bother with the first hit result, the rest is just wasting resources. Or perhaps even allow the possibility to specify the maximum number of objects to trace.