Help with camera FOV for muzzle flash particle size

I am trying to make a particle change size depending on the FOV, as you can see now is too big when pointing at things, any idea of how to solve this?

Im using normal 2d sprites

Would be helpful to know if you’re using Niagara or Cascade.

In Niagara you can simply use the lod distance parameter to scale by distance to the particle system, or read FOV from camera properties (gpu only)

In cascade this isn’t possible, so you’ll have to pass the FOV down to the material and scale the sprite using world position offset.

Great it works, yeah I am using niagara, could you tell me more about this LOD distance parameter I want to know how does it works.

You can turn off one set of particles and turn on other by distance to camera or LOD (there are many approaches to achieve this)
You can have 2 sets emitters for default and “in scope mode” (for snipes scopes are tricky to set the same effects and for default no scope)

LOD distance is a parameter Niagara keeps internally to calculate scalability with.
It’s already calculated and passed into the system, so using it is really cheap.

So what I am doing is multiplying the size for the LOD distance parameter, but I’m not sure if it is actually working

  1. You’ll probably want to apply it as a scale sprite size in Update. That module is stackable, so you can easily combine it with any animation you already have.

  2. Instead of a straight multiply, I would suggest lerping between 2 size values based on scaled and clamped LodDistance, so you can have it only kick in once the distance to the element is small enough.
    (if you don’t do this, large distances will also cause the flash to become larger, which will look weird if you use this effect on other player’s weapons for example)

Alright, I will anyhow use a different particle for third person, so it shouldn’t be a problem

Your solution seems perfect for what I’m trying to do, but I can’t quite wrap my head around your steps.

I’m making a system different than OP’s, but the principle is the same.
Dust particles that I want to scale up a bit with distance (with a maximum).

I’m setting up the lerp improperly, what do you mean by scaled and clamped on the LODdistance param? Do you use LODDistance for the alpha?