diff options
author | Jean-Michel Bernard <jmb462@gmail.com> | 2022-02-11 22:59:32 +0100 |
---|---|---|
committer | Jean-Michel Bernard <jmb462@gmail.com> | 2022-02-12 10:20:31 +0100 |
commit | b452534e601ed2037a7471131e5c01d8cb44621b (patch) | |
tree | 4e0e5217d158816ad49e66b78e670a6f63967bb5 /editor/plugins | |
parent | d05f0f15f30e71c1fdc950b037dfedb109780b62 (diff) |
Fix 3D Editor axis drag lines precision issue
Diffstat (limited to 'editor/plugins')
-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 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<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]); } |