Using a custom Trace Channel with default response set to Overlap. So why is LineTraceBySingleChannel() hitting a cube's with response set to Block, but not a cube with response set to Overlap?

Xenial_J
Sat, 03 Apr 2021 10:21:57 +0000
World Creation

I’m using LineTraceBySingleChannel() with a custom channel.

FHitResult shellHit;
bool didHit = GetWorld()->LineTraceSingleByChannel(shellHit, start, end, ECC_GameTraceChannel1, TraceParams);

The custom channel is set up to have the ECR_Overlap response.

+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Overlap,bTraceType=True,bStaticObject=False,Name="Shell")

If I make a default cube and set its collision response to this channel to Block, it works and the line trace gets a hit with all the info as expected. But if I channel the cube’s collision response to Overlap, it doesn’t get a hit. Ie., this fails to hit:

Why does LineTraceBySingleChannel() not get a hit if the cube’s response is set to ECR_Overlap?

3 posts - 1 participant