I found a “reasonable” solution, where I use the opposite sides, create a direction vector, and multiple by my intended “width” of the frame I want. It is slightly to big width-wise, but it should work for now. My complication was trying to create a function that creates the inner vertices FROM the outer ones, without using coordinates.

```
public static Vector3 TranslateDistanceBetweenPoints(this Vector3 start, Vector3 end, float distance)
{
Vector3 dir = end - start;
Vector3 finalPos = start + (dir.normalized * distance);
return finalPos;
}
public void generateMesh()
{
//this assumes the "result" structure contains the outer vertices
innerResult.UpperLeft = result.UpperLeft.TranslateDistanceBetweenPoints(result.LowerRight,widthOfFrame);
innerResult.UpperRight = result.UpperRight.TranslateDistanceBetweenPoints(result.LowerLeft,widthOfFrame);
innerResult.LowerLeft = result.LowerLeft.TranslateDistanceBetweenPoints(result.UpperRight,widthOfFrame);
innerResult.LowerRight = result.LowerRight.TranslateDistanceBetweenPoints(result.UpperLeft,widthOfFrame);
//now use these points to create a mesh from the inner and outer points
//UL
//UR
//LL
//LR
Vector3[] vertices = new Vector3[]
{
//outer
result.UpperLeft,//0
result.UpperRight,//1
result.LowerLeft,//2
result.LowerRight,//3
//inner
innerResult.UpperLeft,//4
innerResult.UpperRight,//5
innerResult.LowerLeft,//6
innerResult.LowerRight//7
};
Vector3[] normals =
{
-Vector3.forward,
-Vector3.forward,
-Vector3.forward,
-Vector3.forward,
-Vector3.forward,
-Vector3.forward,
-Vector3.forward,
-Vector3.forward
};
Vector2[] uv = new Vector2[]
{
new Vector2(1, 1),
new Vector2(1, 0),
new Vector2(0, 1),
new Vector2(0, 0),
new Vector2(1, 1),
new Vector2(1, 0),
new Vector2(0, 1),
new Vector2(0, 0)
};
int[] triangles = new int[]
{
//upper
0, 1, 4,
4, 1, 5,
//lower
2, 6, 7,
2, 7, 3,
//left
2, 0, 4,
2, 4, 6,
//right
7, 5, 1,
7, 1, 3
};
meshFilter.mesh.Clear();
meshFilter.mesh.MarkDynamic();
meshFilter.mesh.vertices = vertices;
meshFilter.mesh.triangles = triangles;
meshFilter.mesh.normals = normals;
meshFilter.mesh.uv = uv;
}
```