Colliders Occlude Light Flares?

Place a light and a sphere collider component on the same object and the flare does not display, because the invisible collider is occluding it.

You can, of course, move the light outside of the collider but that defeats the purpose in my current scenario.

Is this intentional?

Charles

Yes, colliders occlude lens flares, this is intentional.

Without occlusion, you’d have situations like your sun flare being visible through buildings and so on, which would be highly undesirable. You can put objects on the TransparentFX layer, which will cause colliders to not occlude lens flares.

–Eric

Yeah, I can understand that.

I’ll double-check but I tried that last night (putting the object on T/FX) but it didn’t seem to work, at least in the case where the light and the collider are components in the same object.

Thanks!
Charles

Hmm…works fine here.

–Eric

Ahhh, I see what you mean but I don’t think I explained the original problem well enough.

As you say, if I place any normal collider occluding my flare on TFX, the flare will shine.

However if you place a light on TFX, the flare will not shine due to being on TFX.

My original problem is that I wanted my single gameobject to include both a collider and a light/flare.

Hence, if I place the object on TFX to remove the collider occlusion I lose the light/flare due to TFX, so it becomes moot.

Unless I’m missing something I have to assume the collider and light will have to be on separate game objects, at the same position, with the collider on TFX and the light on Default.

I really due appreciate your time, Thanks!
Charles

Oh yeah, you’re right…it was showing up in the game view normally so I assumed it was working, but when I hit play it went away…

–Eric