Hi
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.