Skip to content

Commit

Permalink
Merge pull request #30067 from GlaceGwyneth/gridmap-fix
Browse files Browse the repository at this point in the history
Fix GridMap transform problems
  • Loading branch information
akien-mga authored Jun 25, 2019
2 parents 7a56873 + f1bd1c2 commit ca084db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/gridmap/grid_map_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()) {

Expand Down

0 comments on commit ca084db

Please sign in to comment.