0
\$\begingroup\$

I use Blender to show examples. I want to do this in Unity on runtime.

enter image description here enter image description here

The outside corner vertex will be moved passed edge and the triangles appearance will be messed up like it shows on the second image (see the black area it creates).

The same thing is happens if you move an inside vertex past any edge.

enter image description here enter image description here

I want an effect that looks like this:

enter image description here enter image description here enter image description here

I want to select any number of vertices to move and when I move them, they push or pull nearby vertexes until a vertex reaches an edge, where it stop moving and can't move past it. In the screenshots I show, I select only 1 vertex to move but I want it to work for any number of vertex selected.

I tried to find all edges and check if a vertex passes over them but it doesn't seem to work and performance is bad. I use mesh with around 250 to 500 vertices.

How can I prevent any vertex from passing any edge so that the triangles don't overlap?

Edit: https://imgur.com/YpiWHyl this effect is similar to what i want to do

\$\endgroup\$
4
  • \$\begingroup\$ I admit I don't know how to do this, but my hunch is the solution is non-trivial. I'm guessing you want to concentrate your game development on things other than developing a performant mesh deformer solution, therefore I would suggest you look at 3rd party solutions to the problem, at least at the scaffold stage of your game development? This looks promising to me (no affliation with vendor and I haven't tried the asset myself): assetstore.unity.com/packages/tools/modeling/… \$\endgroup\$ Oct 2 '21 at 0:46
  • \$\begingroup\$ @AcmeNerdGames no right now im trying to tackle the mesh deformer problem \$\endgroup\$
    – brun ost
    Oct 2 '21 at 20:09
  • \$\begingroup\$ that's fair and good luck to you -- it's an interesting problem for sure. \$\endgroup\$ Oct 2 '21 at 20:38
  • \$\begingroup\$ this topic is about a similar problem, maybe worth following? gamedev.stackexchange.com/questions/196633/… \$\endgroup\$ Oct 3 '21 at 17:06

You must log in to answer this question.

Browse other questions tagged .