I have two Vector3 points which will define the diagonal points of a rectangle in world-space. I can acquire the unknown points of the rectangle simply by combining the x and z values of both A and B

Known diagonal points:
Vector3 a = (4, 1, 16)
Vector3 b = (18, 1, 4)

Remaining points…
Vector3 c = (a.x, 1, b.z)
Vector3 d = (b.x, 1, a.z)

Rather then setting all the points manually I’m curious if there’s a loop formula (given 2 Vector3’s) that can find the remaining points of a rectangle as well as 4 additional points on a higher Y axis to make up a 3d rectangle? Ideally the points will be in consecutive order that way I can linecast between each one