Josh Posted April 22 Posted April 22 Currently, this is considered a quality setting. I am planning to move it into the world settings, at which point it would make sense to store this in the scene file, but I did not want to make too many changes too quickly. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Yue Posted April 22 Author Posted April 22 23 minutes ago, Josh said: Actualmente, esto se considera un entorno de calidad. Estoy planeando moverlo a la configuración del mundo, momento en el que tendría sentido almacenar esto en el archivo de escena, pero no quería hacer demasiados cambios demasiado rápido. Can those values be modified in lua script? Quote
Solution Josh Posted April 22 Solution Posted April 22 Yes. The command is DirectionalLight:SetShadowCascadeDistance(f0, f1, f2, f3) I went ahead and moved this into world properties and it will get saved in the map, in the next update. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted April 23 Posted April 23 @Yue's wish is my command: https://github.com/Leadwerks/Documentation/blob/master/Lua/Light_SetCascadeDistance.md 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Yue Posted Saturday at 01:35 AM Author Posted Saturday at 01:35 AM On 22/4/2025 at 21:30, Josh said: @Yue's wish is my command: https://github.com/Leadwerks/Documentation/blob/master/Lua/Light_SetCascadeDistance.md It doesn't work here. this.sun = self:FindSun() self.sun:AddTag("SUN") self.sun:SetCascadeDistance(256) -- Error. if level == "Level01" then this.sun = self:FindSun() self.sun:AddTag("SUN") this.x = self:FindLight("SUN") --Sun Map. self.x:SetColor(1,0,0,1) -- Ok Change Color. self.x:SetCascadeDistance(256,512,1024,2048) end Quote
Yue Posted Saturday at 07:01 PM Author Posted Saturday at 07:01 PM if level == "Level01" then this.sun = self:FindSun() self.sun:AddTag("SUN") if self.sun.AddTag then Print("YESSSSS TAG") -- Print on Console. end this.x = self:FindLight("SUN") --Sun Map. self.x:SetColor(1,0,0,1) -- Ok Change Color. if self.x.SetCascadeDistance then Print("Yes SetCascadeDistance") --Not print on console end end Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.