Fangliding Posted December 12, 2024 Share Posted December 12, 2024 I want to add light to voidcloth_umbrella, So I add this in AddPrefabPostInit inst.entity:AddLight() inst.Light:SetColour(1, 1, 1) inst.Light:SetFalloff(0.85) inst.Light:SetIntensity(0.85) inst.Light:SetRadius(16) inst.Light:Enable(false) and add inst.Light:Enable(true/false) in raindome turnon/off function Everyting is OK, but when I pick it up and put it down, but don't active the raindome, it will have lights until I turn on and turn off the raindome And I am curious about these two parameters Falloff and Intensity The Lua in the game sets them all at 0.7~ 0.85. If I set then to 1 and 1, I will go a perfect square, the side length is Radius*2 Link to comment https://forums.kleientertainment.com/forums/topic/162295-how-does-the-light-component-work/ Share on other sites More sharing options...
Fangliding Posted December 13, 2024 Author Share Posted December 13, 2024 I seems found a way to fix this, just for others who wants to get a solution use inst.Light:SetRadius(0) & inst.Light:SetRadius(xxx) instead of inst.Light:Enable() Link to comment https://forums.kleientertainment.com/forums/topic/162295-how-does-the-light-component-work/#findComment-1775602 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now