mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Inverse square law for light range
This commit is contained in:
parent
9638caefe1
commit
ea721d2519
@ -35,6 +35,7 @@ namespace NewHorizons.Builder.Body
|
||||
var light = sunLight.AddComponent<Light>();
|
||||
light.CopyPropertiesFrom(GameObject.Find("Sun_Body/Sector_SUN/Effects_SUN/SunLight").GetComponent<Light>());
|
||||
light.intensity *= starModule.SolarLuminosity;
|
||||
light.range *= Mathf.Sqrt(starModule.SolarLuminosity);
|
||||
|
||||
var faceActiveCamera = sunLight.AddComponent<FaceActiveCamera>();
|
||||
faceActiveCamera.CopyPropertiesFrom(GameObject.Find("Sun_Body/Sector_SUN/Effects_SUN/SunLight").GetComponent<FaceActiveCamera>());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user