Fix light's position, as it expects it's coordinates in voxel world data space. Will probably change this eventually.

This commit is contained in:
Relintai 2020-07-07 18:01:21 +02:00
parent 5ee5b12a4e
commit dee38b1588

View File

@ -574,7 +574,7 @@ void VoxelWorld::add_prop(Transform tarnsform, const Ref<PropData> &prop, const
Ref<VoxelLight> light;
light.instance();
light->set_world_position(wp.x, wp.y, wp.z);
light->set_world_position(wp.x / get_voxel_scale(), wp.y / get_voxel_scale(), wp.z / get_voxel_scale());
light->set_color(light_data->get_light_color());
light->set_size(light_data->get_light_size());