Merge pull request #116683 from YeldhamDev/grid_map_rotation_fix
Fix wrong rotation of cells while being pasted in the `GridMap` editor
This commit is contained in:
commit
d89e19f556
1 changed files with 2 additions and 2 deletions
|
|
@ -653,12 +653,12 @@ void GridMapEditor::_update_paste_indicator() {
|
|||
}
|
||||
xf = Transform3D();
|
||||
xf.origin = (paste_indicator.current - paste_indicator.distance_from_cursor + center) * node->get_cell_size();
|
||||
xf.basis = rot * xf.basis;
|
||||
xf.basis = rot;
|
||||
xf.translate_local(item.grid_offset * node->get_cell_size());
|
||||
|
||||
Basis item_rot;
|
||||
item_rot = node->get_basis_with_orthogonal_index(item.orientation);
|
||||
xf.basis = item_rot * xf.basis * node->get_cell_scale();
|
||||
xf.basis *= item_rot * node->get_cell_scale();
|
||||
|
||||
RenderingServer::get_singleton()->instance_set_transform(item.instance, node->get_global_transform() * xf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue