diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-25 14:58:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 14:58:32 +0200 |
commit | ca084db4aa6d5da8f34fc889d70f1b8e46990b82 (patch) | |
tree | 3c4a7174ac3e5bf84f31084ad913ab1815a585cc | |
parent | 7a56873271c6254d7583cf8dad52c410d7edcdca (diff) | |
parent | f1bd1c268e96f8368be6a0eea05eacbe36d35557 (diff) |
Merge pull request #30067 from GlaceGwyneth/gridmap-fix
Fix GridMap transform problems
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 6b9a97efb4..03619aa0bd 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -279,7 +279,7 @@ void GridMapEditor::_update_cursor_transform() { cursor_transform = Transform(); cursor_transform.origin = cursor_origin; cursor_transform.basis.set_orthogonal_index(cursor_rot); - cursor_transform = node->get_transform() * cursor_transform; + cursor_transform = node->get_global_transform() * cursor_transform; if (cursor_instance.is_valid()) { VisualServer::get_singleton()->instance_set_transform(cursor_instance, cursor_transform); @@ -420,7 +420,7 @@ bool GridMapEditor::do_input_action(Camera *p_camera, const Point2 &p_point, boo } last_mouseover = Vector3(cell[0], cell[1], cell[2]); - VS::get_singleton()->instance_set_transform(grid_instance[edit_axis], Transform(Basis(), grid_ofs)); + VS::get_singleton()->instance_set_transform(grid_instance[edit_axis], node->get_global_transform() * edit_grid_xform); if (cursor_instance.is_valid()) { |