What I’m doing here is using for X the smaller of 190, and hit1.point.x / 2.5f, so if the formula is more than 190, it will use 190, if it is smaller, it will use the formula. Same goes with Z.

Your original issue was that the second if overwrote whatever value the first if put, because you created a new vector using both X and Z. If you’d want to keep the original X, you’d use something like this in your second if:

cornerPoint[2] = new Vector2(cornerPoint[2].x, WHATEVER);

So you’d keep the X value set by your first if, and only set the Y value.