Browse Source

Merge pull request #101103 from Calinou/editor-gridmap-translucent-cursor

Make the GridMap editor cursor translucent
Rémi Verschelde 7 months ago
parent
commit
38ffeb56f4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      modules/gridmap/editor/grid_map_editor_plugin.cpp

+ 4 - 0
modules/gridmap/editor/grid_map_editor_plugin.cpp

@@ -1290,6 +1290,10 @@ void GridMapEditor::_update_cursor_instance() {
 		cursor_outer_mat->set_albedo(Color(pick_color, 0.8));
 		cursor_outer_mat->set_albedo(Color(pick_color, 0.8));
 		cursor_instance = RenderingServer::get_singleton()->instance_create2(cursor_mesh, get_tree()->get_root()->get_world_3d()->get_scenario());
 		cursor_instance = RenderingServer::get_singleton()->instance_create2(cursor_mesh, get_tree()->get_root()->get_world_3d()->get_scenario());
 	}
 	}
+
+	// Make the cursor translucent so that it can be distinguished from already-placed tiles.
+	RenderingServer::get_singleton()->instance_geometry_set_transparency(cursor_instance, 0.5);
+
 	_update_cursor_transform();
 	_update_cursor_transform();
 }
 }