Set Fade Screen Size blueprint function doesn't affect decal

I’m working on a first person shooter and the projectiles spawn a deferred decal at location on hit. These decals need to be visible from any distance and it was all working properly this morning!

After spawning decal at location, I use Set Fade Screen Size to set a new value of 0.0 (as confirmed by a print string); however, the decal still behaves as if the value was default and fades as you move far enough away from it.

As a comparison, I put a DecalActor onto a wall in the map via the map editor and set its Fade Screen Size value to 0.0 in the details panel and it behaves properly (doesn’t fade no matter how far away the player is).

I tried compiling the game to see if it was a problem with previewing it in the editor but the problem persists. The last thing I did before this problem started was preview the game in the editor with number of players set to 2 for the first time. Up until today I had only ran it with 1 player.

Any ideas? Perhaps this is a bug with the blueprint?

Ok, finally figured it out!

What caused the decals to start fading in my case was changing the Decal Size “X” dimension down to 0.01 from 10.0 or whatever I had it set to before. Thinking back, I made that change while only looking at the decals from up close, then I moved on to multiplayer which now appears to be unrelated.

I decreased this dimension because I noticed the decals would “bleed” off the edge of one object and its cross-section would be visible on an adjacent object. Decreasing the “thickness” of the decal would minimize this effect. Unfortunately, the thickness of the decal appears to affect its “Screen Size” causing it to fade even though the Y and Z dimensions are large enough that the decal is above the minimum size on my screen. Perhaps the engine is able to handle this gracefully if I were to somehow change my decal so X is width, Y is height, and Z is depth?

1 Like