Search Unity

[Cloth] Cloth.vertices != Mesh.vertices. But then how to change coefficients at runtime via indices?

Discussion in 'Physics' started by YoungXi, Jun 28, 2017.

  1. YoungXi

    YoungXi

    Joined:
    Jun 5, 2013
    Posts:
    63
    So as the Unity doc says:

    "Note that the vertex indices may not necessarily correspond to the indices of the source mesh - especially when triangle stripping or UV seams are used in the source mesh (ie, multiple indices for the same vertex), cloth vertices will be different, as the cloth simulation only uses a single index for each vertex."

    Then how can we change the cloth.coefficients at runtime through vertex indices?

    Is that even possible ?

    The reason I need to do this is that, I have clothes in different layers, when the higher layered cloth covered the lower, I need to set their coefficients for the vertices that overlap.
     
  2. YoungXi

    YoungXi

    Joined:
    Jun 5, 2013
    Posts:
    63
    tiggaxxx and HenryChinaski like this.