Quick answer: The Particle System Trails module uses its own separate material. If that material has ZTest Always or sits in the Overlay queue, the trail will draw on top of opaque geometry. Assign a trail material with ZTest LessEqual and Render Queue 3000.

Here is how to fix Unity particle trails that visibly draw through walls and other opaque objects. Your projectile flies behind a column and the head particle is correctly occluded, but the trail tail snakes across the screen as if the column was not there. The trail uses a different material than the head, and that material’s depth-test settings are almost always the problem.

The Symptom

A Particle System with the Trails module enabled emits trails that pass through walls, terrain, or any other opaque geometry. The head particle disappears correctly when occluded; only the trail ribbon ignores depth. The effect breaks readability for projectiles, magic effects, or movement trails.

What Causes This

Trails module uses its own material. The Particle System Renderer has two material slots: Material (for particles) and Trail Material (for trails). Setting the first does not affect the second.

The trail material has ZTest Always. Many premade trail shaders disable depth testing so they can be used as UI overlays. When applied to a world-space trail, this means walls do not occlude them.

Wrong render queue. Materials in queue 4000 (Overlay) draw after everything else and ignore depth. Trails meant for in-world use should be in queue 3000 (Transparent).

Soft Particles disabled with thin geometry. If trails should fade against geometry, soft particles need depth texture access. Without it, the trail clips harshly through anything close.

The Fix

Step 1: Assign a proper trail material. On the Particle System Renderer, drag a new material into the Trail Material slot. Use a duplicate of Particles/Standard Unlit or your URP equivalent.

Step 2: Set ZTest to LessEqual. In the trail material’s shader properties, set ZTest to LessEqual. If using Shader Graph, expose ZTest in the URP Lit/Unlit master node.

// In a custom shader, inside SubShader/Pass:
ZWrite Off
ZTest LessEqual
Blend SrcAlpha OneMinusSrcAlpha
Tags { "Queue"="Transparent" "RenderType"="Transparent" }

Step 3: Adjust the render queue. In the Material Inspector, click the gear icon to switch to Debug mode if needed and set Render Queue to 3000 (Transparent). Avoid 4000 (Overlay) unless you want the trail on top of UI as well.

Step 4: Enable soft particles for fade against walls. In the trail shader, enable Soft Particles and set Near and Far Fade values. The trail then fades smoothly into geometry rather than clipping abruptly. URP requires Depth Texture enabled in the URP Asset.

// Verify URP depth texture for soft particles
// Edit -> Project Settings -> Graphics -> URP Asset -> General
Depth Texture     = true
Opaque Texture    = true  // only if shader needs it

Step 5: Confirm at runtime via the Frame Debugger. Window → Analysis → Frame Debugger. Step until you see the particle trail draw call. The shader name should match your assigned trail material, and the ZTest column should be LEqual.

Common Mistakes to Avoid

Do not use UI/Default as a trail material. It has ZTest Always built in. Do not set the trail material’s queue to Overlay just because that is what the head particle uses; the head and trail should both be in Transparent queue 3000 unless you have a specific reason to differ.

Watch out for material instances. If you assign a material at runtime via renderer.trailMaterial on a copy you forgot to apply changes to, the trail uses the asset version. Always verify with the Inspector or Frame Debugger.

“Two materials, two depth modes. The Trails slot needs the same depth respect as the head particle, or it draws through walls.”

Related Issues

For trails that disappear entirely, see Particle System Not Playing. For trail color glitches, see VFX Graph Particles Not Spawning.

Trail Material slot. ZTest LessEqual. Queue 3000. Walls block the trail again.