summaryrefslogtreecommitdiffstats
path: root/modules/gridmap/editor/grid_map_editor_plugin.cpp
diff options
context:
space:
mode:
authorsmix8 <52464204+smix8@users.noreply.github.com>2023-11-27 19:37:52 +0100
committersmix8 <52464204+smix8@users.noreply.github.com>2024-11-27 01:06:21 +0100
commit612981c1ea7d1beb927b53a2e4056827ed6ca32a (patch)
treea5dbb323ba357ab8a0e322611f7d43f203ba0f08 /modules/gridmap/editor/grid_map_editor_plugin.cpp
parentbbc54692c05ff6a85a6aeefbf5b9c87de91983d8 (diff)
downloadredot-engine-612981c1ea7d1beb927b53a2e4056827ed6ca32a.tar.gz
Add ShadowCastingSetting to MeshLibrary / GridMap items
Adds ShadowCastingSetting to MeshLibrary / GridMap items.
Diffstat (limited to 'modules/gridmap/editor/grid_map_editor_plugin.cpp')
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index 0d522a0562..e76e9e4953 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -1233,6 +1233,8 @@ void GridMapEditor::_update_cursor_instance() {
Ref<Mesh> mesh = node->get_mesh_library()->get_item_mesh(selected_palette);
if (!mesh.is_null() && mesh->get_rid().is_valid()) {
cursor_instance = RenderingServer::get_singleton()->instance_create2(mesh->get_rid(), get_tree()->get_root()->get_world_3d()->get_scenario());
+ RS::ShadowCastingSetting cast_shadows = (RS::ShadowCastingSetting)node->get_mesh_library()->get_item_mesh_cast_shadow(selected_palette);
+ RS::get_singleton()->instance_geometry_set_cast_shadows_setting(cursor_instance, cast_shadows);
}
}
} else if (mode_buttons_group->get_pressed_button() == select_mode_button) {