Fix created face's orientation when only 3 verts are selected.

This commit is contained in:
Relintai 2022-01-28 13:58:17 +01:00
parent f080b6041e
commit 61cfc92beb

View File

@ -1120,7 +1120,7 @@ func create_face():
else: else:
tfn = MDRMeshUtils.get_face_normal(_vertices[i0], _vertices[i1], _vertices[i2]) tfn = MDRMeshUtils.get_face_normal(_vertices[i0], _vertices[i1], _vertices[i2])
var flip : bool = MDRMeshUtils.should_triangle_flip(v0, v1, v2, tfn) var flip : bool = !MDRMeshUtils.should_triangle_flip(v0, v1, v2, tfn)
MDRMeshUtils.add_triangle_at(_mdr, v0, v1, v2, flip) MDRMeshUtils.add_triangle_at(_mdr, v0, v1, v2, flip)
add_mesh_change_undo_redo(orig_arr, _mdr.array, "Create Face") add_mesh_change_undo_redo(orig_arr, _mdr.array, "Create Face")