Issue with rotation matrix and world position offset applied on mesh particle

I’m applying vertex offset with math on a mesh particle. The idea is to change a unit tube into a cone shape which would be drive by dynamic parameters. To do so I’m using two rotation matrices in the shader. The offsets are working fine on an actor no matter the rotation, but as soon as I’m trying it on mesh particle, if either not in local space or with a custom initial rotation, the offset is broke.

Here’s a simplified version of the material.

Am I missing a step here?

The same shader is working under Cascade with different spawn orientation for each particles. So it looks like a Niagara bug.

One thing you can try is: Rather than using the transform to LocalSpace in the LocalPosition node, you can transform from World->MeshParticleSpace. And try doing that at the end of your node chain (rather than Local->World).
I doubt it will fix your issue, but might be worth a try.

I’ve also had some really weird issues with attached Niagara Systems, where i did some vector transformations from local to simulation space (which made no sense to me at all). So you could also try to transform your orventation vector manuall into other spaces.

This feels all a bit arbitrary, but I’ve always had issues with the different spaces and particles (even in cascade)…
Maybe someone from Epic can help further…

1 Like