Quick answer: A trace on the Visibility channel only stops at actors set to Block on Visibility. If your wall is set to Overlap, the trace passes through and you get false negatives. Set walls to Block; set transparent things (glass) to Overlap if you need both.

LineTraceByChannel says the player can see through a brick wall. Or the bullet phases through an enemy. The trace is correct — it’s just consulting the per-actor response config and your config is wrong.

The Symptom

LineTrace, SphereTrace, or BoxTrace returns no hit (or the wrong hit) when intersecting an actor that should block. bHit is false; OutHit.Actor is empty. In the editor, Show → Collision visualizes the geometry and confirms the trace ray crosses the mesh.

The Mental Model

Two axes:

A trace runs on a single channel (Visibility, Camera, or a custom one). For each actor along the ray, Unreal checks that actor’s response on this channel:

The Fix

Step 1: Choose the right Trace Channel. Project Settings → Engine → Collision → New Trace Channel. Common ones:

Visibility   - line-of-sight, AI senses
Camera       - camera collision (closer than Visibility)
Weapon       - bullets and projectiles
Interaction  - click-to-interact

Step 2: Set per-actor responses. On a wall or character, open the static mesh component or capsule’s Collision section. Click “Custom” in Collision Presets to expose the channel matrix. Set responses:

Wall (StaticMeshComponent):
  Object Type: WorldStatic
  Trace Responses:
    Visibility: Block
    Camera:     Block
    Weapon:     Block
    Interaction: Ignore
Glass (StaticMeshComponent):
  Object Type: WorldStatic
  Trace Responses:
    Visibility: Overlap   // can see through
    Weapon:     Block     // bullets stop

Step 3: Use multi-trace if you want overlaps + block.

UWorld* World = GetWorld();
TArray<FHitResult> Hits;
FCollisionQueryParams Params;
Params.AddIgnoredActor(this);
World->LineTraceMultiByChannel(Hits, Start, End, ECC_Visibility, Params);

for (const auto& Hit : Hits)
{
    UE_LOG(LogTemp, Log, TEXT("Hit %s: blocking=%d"),
           *Hit.GetActor()->GetName(), Hit.bBlockingHit);
}

Multi returns all overlap hits plus the first blocking hit, in order along the ray.

Diagnosing

Console: show Collision in PIE. Walls render their collision shape. DrawDebugLine visualizes your trace. If the line crosses the visible collision geometry but no hit is reported, the response is Overlap or Ignore.

“Block stops. Overlap reports. Ignore is invisible. Set responses per role and traces work.”

Related Issues

For overlap events not firing, see overlap events. For physics asset constraints, see physics constraints.

Block stops. Overlap continues. Right channel, right response, traces hit.