Fix 3D Editor axis drag lines precision issue
This commit is contained in:
parent
d05f0f15f3
commit
b452534e60
@ -6307,14 +6307,15 @@ void fragment() {
|
|||||||
// Lines to visualize transforms locked to an axis/plane
|
// Lines to visualize transforms locked to an axis/plane
|
||||||
{
|
{
|
||||||
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
|
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
|
||||||
surftool->begin(Mesh::PRIMITIVE_LINES);
|
surftool->begin(Mesh::PRIMITIVE_LINE_STRIP);
|
||||||
|
|
||||||
Vector3 vec;
|
Vector3 vec;
|
||||||
vec[i] = 1;
|
vec[i] = 1;
|
||||||
|
|
||||||
// line extending through infinity(ish)
|
// line extending through infinity(ish)
|
||||||
surftool->add_vertex(vec * -99999);
|
surftool->add_vertex(vec * -1048576);
|
||||||
surftool->add_vertex(vec * 99999);
|
surftool->add_vertex(Vector3());
|
||||||
|
surftool->add_vertex(vec * 1048576);
|
||||||
surftool->set_material(mat_hl);
|
surftool->set_material(mat_hl);
|
||||||
surftool->commit(axis_gizmo[i]);
|
surftool->commit(axis_gizmo[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user