Background Particles, CanvasModulate, and Light2D are not playing nice together

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jarlowrey

I have some background particles (2 second Youtube video example).

I am trying to create a night-like effect using a Black CanvasModulate. The Player has a spotlight and an area light. It appears that these lights are not lighting up the particles unless highly specific, seemingly random areas are illuminated. When the particles are not illuminated, they can be faintly seen crossing over top of the player as black particles.

I would like the particles to be visible if within the light areas, otherwise hidden. Is this possible?

:bust_in_silhouette: Reply From: jarlowrey

The issue was with the Visibility Rect inside of Particle2D’s Drawing section. I saw this rectangle was small and guessed that this was causing the issue. I made the rectangles huge, as large as (or larger) than the viewport/screen, and this has ensured the lights will intersect the visible area.

You can see the visibility rectangle in the scene editor below

enter image description here