防止爆炸粒子效果穿过地形

Prevent explosion particle effect clipping through terrain

我在我的游戏中实现了爆炸粒子,但是当它产生时,它会被切掉以对应最近的环境对象。

这个问题,我得到:

总的来说有多个粒子系统运行实现了这个但我附上了一个粒子系统检查面板的详细信息:

大多数粒子系统都存在类似的渲染器。所以请指导我解决上面的效果切墙相关问题。

EDIT-1:

我已经添加了一个 VFX 渲染相机,稍后也为效果单独创建,但结果没有变化。

EDIT-2

这是游戏主摄像头的截图:

我在用户 AlecMoody 写的 polycount forums 上找到了这条建议:

[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.

由于子相机的深度较高不会使其在深度较低的相机上方渲染,因此将清除标志设置为“仅深度”可能会对您有所帮助。

您可以向粒子添加碰撞,以便它们从世界对象弹开或被摧毁。

示例碰撞设置

它会增加一点开销,但取决于效果使用的粒子数量,这应该不是问题,如果是,您可以使用较低的碰撞质量进行测试。