Since i know Niagara existence, i used it, is the future of VFX after all !
Currently I have a little problem with it : How can I set another collision type for emmiter instead of the current “World Static” to a custom collision type set in project settings ?
(I found that Niagara collision is set to “World Static” because i’ve made some tests with a mesh colliding with niagara particles and the only way to have effective collisions is to set collision type of the mesh to “World Static”)
With Cascade when I add a Collision Module it have a section with “Collision Type” that I can use to change collision type :
Niagara is still in early access. It is not at feature parity with Cascade. Right now the implementation just uses WorldStatic and cannot be changed. You are free to implement your own approach (as you did above), but we will likely implement it differently when we do implement it for Niagara.
As I have a source engine in version 4.21.1, I modified NiagaraCollision.cpp and changed :
EColisionChannel::ECC_StaticWorld by ECollisionChannel::ECC_GameTraceChannel1.
At line 68 : FTraceHandle Handle = SystemWorld->AsyncLineTraceByChannel(EAsyncTraceType::Single, Position, EndPosition, ECollisionChannel::ECC_GameTraceChannel1, QueryParams, FCollisionResponseParams::DefaultResponseParam, nullptr, i); // Was EColisionChannel::ECC_StaticWorld
At line 216 : FTraceHandle Handle = SystemWorld->AsyncLineTraceByChannel(EAsyncTraceType::Single, Position, EndPosition, ECollisionChannel::ECC_GameTraceChannel1, QueryParams, FCollisionResponseParams::DefaultResponseParam, nullptr, i); // Was ECollisionChannel::ECC_StaticWorld
Then I added into the Project Settings → Collision a New trace channel with a custom name like “Niagara”.
Now it work well. I know it’s not the best solution because I use a custom trace channel for this but it’s the only workaround I was able to do with my knowledge of the engine.
So what do you mean by “Changing the collision type is currently not supported by CPU particles” for Niagara ?
Niagara doesn’t have an equivalent for the collision type yet. We will investigate adding in a future version. No matter what it won’t work for GPU, as that has to use depth buffer collision, which has lost any information about the colliders.