- Home /
Question by
Dot45 · Jun 22, 2012 at 06:51 AM ·
editormesheditor-scriptingvertices
how to get 2 vertices from mesh edge?
I am developing the editor extension in order to add vertex point to mesh and drag it to adjust position
the problem is how i can get 2 vertices by double click at edge? So i can modify triangle list
Comment
Answer by rashid · Aug 23, 2013 at 06:56 PM
First, Find the "Procedural" Sample. In it check MeshExtrusion.cs, you will find a method to create edge-list. Then Check your click and loop over edges (or use spatial partitioning to find out which of vertices are closest to your click and hence eventually which edge were closest to your click). Create a new vertex and add a new triangle with this information. You may need to remove old triangle and re-triangulate.