Search code examples
unity-game-engineparticles

Prevent explosion particle effect clipping through terrain


I have implemented blast particle within my game but when it spawns, it gets cutout to correspond to the nearest environment object.

This problem, I was getting: enter image description here

Overall there are multiple particle systems are running to achieve this but I am attaching one particle system inspector panel details:

enter image description here

A similar kind of renderer exists for mostly all particle systems. So please guide me to solve the above effect cut related problem with the wall.

EDIT-1:

I have added a VFX rendering camera and created separate later too for the effects but there is no change in the result. enter image description here

EDIT-2:

Here you have a screenshot for the Main Camera of the game: enter image description here


Solution

  • I found this advice on the polycount forums written by user AlecMoody:

    [1.] Create a second camera parented to the primary camera...

    [2.] Create a render layer for your [particle effect] (or assign it to an existing layer).

    [3.] Set the main camera culling mask to everything except your explosion layer.

    [4.] Set the child camera culling mask to only be your explosion layer. The child camera should have the clear flag set to "don't clear"

    [5.] and put a positive value into the [child] camera depth.

    Since for you having a higher depth on the child camera doesn't make it render above the lower depth cameras, setting the clear flag to "depth only" may help you.