One light is hiding another light in Unity

Started by
3 comments, last by Juliean 3 years, 11 months ago

I've got a vehicle with working lights, but I'm having a weird issue where when I activate the headlights (which includes headlights and tail lights) everything turns on fine, but when I turn on the brights, it is hiding the tail lights. Let me explain: It is not turning them off, or lowering the intensity, or changing the tail lights in ANY way. If I move the camera to a certain location, I can suddenly see that the tail lights are on. but from a normal camera location, they appear to be off. Turn off the brights, and suddenly they are visible again. Any ideas why this is? Someone said colliders could be blocking them, but it doesn't appear to be that… also, if I move the brights gameobject away from the vehicle, everything works fine. So it seems like something to do with them being a certain proximity to the tail lights…. but it doesn't appear as though anything is overlapping. it should be noted the brights are spot lights and the tail lights are point lights.

Advertisement

Unity has a a maximum count for active dynamic pixel-lights, which is configurable). Check the quality-settings, maybe thats it?

@Juliean well… that fixed it. But I'll be honest I'm not sure why. This vehicle has many lights on it and the project was set to limit it at 4, but I certainly already had far more than 4 lights on. So… idk why it felt the need to hide just the tail lights. But consider this thing has been crashing a ton since I've been messing with the lights, I'd say there's something a bit buggy going on there. Regardless, it works now and thanks for the help!

I'm not entirely sure how unity calculates which lights so show, but I think you can mark lights as important or not important on their components, You should check that out, as having more many dynamic-pixel lights can degrade performance quite heavily in unity.

This topic is closed to new replies.

Advertisement