Search Unity

Procedurally generated elastic mesh

Discussion in 'General Graphics' started by FarzadF, Jan 3, 2020.

  1. FarzadF

    FarzadF

    Joined:
    Aug 5, 2014
    Posts:
    3
    Hi

    Untitled.png

    Let's say I have two cubes in two different gameObjects at a distance from each other.
    And I want to procedurally create 3rd gameObject, containing a plane, which attaches an edge from one of the cubes, to an edge of the other cube. Like picture (A) attached.

    This shouldn't be too hard, I could read the positions of the vertices of these cubes and create an array of the positions that I need and make the mesh. However, I want this new mesh to be sort of glued to both of these cubes, so that if one of the cubes is moved and the other is not, it causes a deformation in the plane and it stretches. Like the picture (B).

    So I kinda need to take two vertices from each cube, and make sure the new mesh is attached to them and follows them.

    Is this possible? If yes, how?

    Any help is highly appreciated. I've been thinking/searching for a while.
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    do the complete glued single mesh properly, add bone to the two box, the end
     
  3. FarzadF

    FarzadF

    Joined:
    Aug 5, 2014
    Posts:
    3
    Can rigging really be done on a procedurally generated mesh and in run-time?

    I found this for example, where someone has said it is not possible.
    There is also this thread in unity forums, where they have replied that "runtime rigging" is coming in 2019.1, but I can't find much more information.

    There are many sources that talk about run-time animation and turning bones etc., but not rigging in C#. Or maybe I have failed to find them.

    Do you know where I should look?