Search Unity

ProBuilder - Is there a way to remove vertices from faces merged at runtime?

Discussion in 'World Building' started by DromoDesigner, Sep 23, 2022.

  1. DromoDesigner

    DromoDesigner

    Joined:
    Mar 27, 2016
    Posts:
    73
    Hello, I am using ProBuilder in runtime, and making a system where the player can merge faces.

    However, after the faces are merged, there are hanging vertices and the edges are still divided.

    I understand that there is no way from the API to get rid of these hanging vertices, so I am trying to write my own code to do this. However, I am having trouble distinguishing the hanging vertices from the ones that are part of the new merged face.

    The merged face object still has all of the original vertices that were part of the pre-merged faces in its distinctIndexes list, so I cannot tell them apart.

    I would like to use the Collapse function at runtime to get rid of hanging vertices ("Collapse to First" option), so I need to know which are the hanging vertices.

    Does anyone please have any suggestions for how I can work out the hanging vertices after I merge faces?