SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
88 stars 18 forks source link

Using multiple SpotLight sources combines them #3924

Open MoltonMontro opened 1 year ago

MoltonMontro commented 1 year ago

Currently, using multiple SpotLight sources at once (e.g. a Headlamp and a Flashlight) causes them to combine and function as a single light source.

Player expectation would likely be that these should be two separate light sources instead.

Tactical Light

SpotLight_Range 360
SpotLight_Intensity 5
SpotLight_Color #ff0000
SpotLight_Angle 10

Tactical Light

Headlamp

SpotLight_Color #00ff00
SpotLight_Intensity 1
SpotLight_Angle 360

Headlamp

Tactical Light + Headlamp

Both SpotLight sources active at the same time. They're combined into a single light source that's less intense, has less range, and has a narrower angle.

Combined

Expectation

What players would likely expect to happen instead.

Expectation

SDGNelson commented 1 year ago

Although some of them are combining in non-ideal ways, this is currently as-intended. I didn't want modded items creating a whole bunch of separate per-item spotlights which could destroy performance, and for example in the future we could enable shadows for the player spotlight.