You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
implement individual mesh transform for meshlibrary items
(cherry picked from commit 70108fd850)
This commit is contained in:
@@ -261,6 +261,12 @@ void GridMapEditor::_update_cursor_transform() {
|
||||
cursor_transform.basis *= node->get_cell_scale();
|
||||
cursor_transform = node->get_global_transform() * cursor_transform;
|
||||
|
||||
if (selected_palette >= 0) {
|
||||
if (node && !node->get_mesh_library().is_null()) {
|
||||
cursor_transform *= node->get_mesh_library()->get_item_mesh_transform(selected_palette);
|
||||
}
|
||||
}
|
||||
|
||||
if (cursor_instance.is_valid()) {
|
||||
VisualServer::get_singleton()->instance_set_transform(cursor_instance, cursor_transform);
|
||||
VisualServer::get_singleton()->instance_set_visible(cursor_instance, cursor_visible);
|
||||
|
||||
Reference in New Issue
Block a user