From f270c67ca1ded77d020efec65338d858bd0183b5 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 18 Mar 2024 09:12:02 +0100 Subject: [PATCH] Improved Light setup in PropInstance. --- modules/props/prop_instance.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/props/prop_instance.cpp b/modules/props/prop_instance.cpp index 27e34be88..26244c483 100644 --- a/modules/props/prop_instance.cpp +++ b/modules/props/prop_instance.cpp @@ -230,8 +230,14 @@ void PropInstance::_prop_preprocess(Transform transform, const Ref &pr if (light_data.is_valid()) { OmniLight *light = memnew(OmniLight); add_child(light); - light->set_color(light_data->get_light_color()); + light->set_param(Light::PARAM_RANGE, light_data->get_light_range()); + light->set_param(Light::PARAM_ATTENUATION, light_data->get_light_attenuation()); + light->set_color(light_data->get_light_color()); + light->set_param(Light::PARAM_ENERGY, light_data->get_light_energy()); + light->set_param(Light::PARAM_INDIRECT_ENERGY, light_data->get_light_indirect_energy()); + light->set_negative(light_data->get_light_negative()); + light->set_param(Light::PARAM_SPECULAR, light_data->get_light_specular()); light->set_transform(t); continue;