diff options
author | JFonS <JFonS@users.noreply.github.com> | 2022-02-14 10:39:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 10:39:44 +0100 |
commit | 58199e5ad009ca6a4995b4dcfd863becd82d6f02 (patch) | |
tree | 6a7f0414262d69410db586adceb731aa68a77706 /editor | |
parent | b59c482f10c64e5b142bbf702cd50af130190225 (diff) | |
parent | b452534e601ed2037a7471131e5c01d8cb44621b (diff) |
Merge pull request #57990 from jmb462/fix-drag-lines-precision-issue
Fix 3D editor axis drag lines precision issue
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 3638ab241c..fc2555d93a 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6308,14 +6308,15 @@ void fragment() { // Lines to visualize transforms locked to an axis/plane { Ref<SurfaceTool> surftool = memnew(SurfaceTool); - surftool->begin(Mesh::PRIMITIVE_LINES); + surftool->begin(Mesh::PRIMITIVE_LINE_STRIP); Vector3 vec; vec[i] = 1; // line extending through infinity(ish) - surftool->add_vertex(vec * -99999); - surftool->add_vertex(vec * 99999); + surftool->add_vertex(vec * -1048576); + surftool->add_vertex(Vector3()); + surftool->add_vertex(vec * 1048576); surftool->set_material(mat_hl); surftool->commit(axis_gizmo[i]); } |