Closed Pandelii closed 3 years ago
Thanks for checking this @Vroonsh!
Looked into it, managed to reproduce by crossing the points to create a concave shape
The surface mesh generator cannot create the top mesh for 2 reasons : Normals could be computed from zero length vector (div by 0) and indices cannot be generated because of the concave shape. Result is a null generated mesh. Dunno if we want to support concave walls, otherwise just checking that the generated mesh is not null to update the UnityMesh is enough to fix the crash, but the result could be ugly (but well...no-one wants to keep an ugly wall on his table ;))
Anyway won't be solved by a merge point feature, because it happens without havind drag points close together. But i think the feature could be interesting, but maybe proposed on the drop down menu if there are other drag-points near the selected one.
In cases like the second image, Perhaps it should attempt to re-order the points to become a valid shape? For example in that image, the selected point would become 2 and point 2 would become point 3, making a valid shape.
Could become quite complicated to solve :) But feasable with convex hull. Will need a feedback from the mesh generator to re setup the control points, or just assume we're creating convex hull based on points cloud.
When dragging points on a wall it is possible to produce a failure state by dragging one point directly over another.
Repro steps: Create a wall Enter point edit mode Select the upper left point Drag the red handle (x) to the right until it overlaps the upper right point.
Expected result: Nothing happens or a prompt appears to ask if you want to merge the points. Actual result: The point disappears and the console log indicates a failure.
PointDragFailure.zip