How to use pickResult when I use faceId, bu - bv to get the coordinate?

hello everyone

I have use triangle method to build a mesh, and then I tried to use PickResult and faceId, I can selected each triangle but how can I change color of each triangle when selected, and also get the coordinates of each triangle.

this is my PG:

So two change material you would need separate mesh as each draw calls can only have one material setup.

If you only speak about colors, you can use vertex colors and update the attribute on click. With this approach, please note that you need to duplicate the vertices to ensure a sharp transition from one tri to the other.

Last but not least, you could keep your mesh and a second one you update for the selection only :slight_smile:

1 Like

Thank you so much :pray:t2: :pray:t2:

1 Like