From b452534e601ed2037a7471131e5c01d8cb44621b Mon Sep 17 00:00:00 2001 From: Jean-Michel Bernard Date: Fri, 11 Feb 2022 22:59:32 +0100 Subject: Fix 3D Editor axis drag lines precision issue --- editor/plugins/node_3d_editor_plugin.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 5f58724594..8da71bdb2c 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6307,14 +6307,15 @@ void fragment() { // Lines to visualize transforms locked to an axis/plane { Ref 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]); } -- cgit v1.2.3