GraphUpdate on a rotated grid graph

Hi !

Here is a small question, i have a grid graph wich is rotate 90 degree around x (from grid graph settings not the transform point).

I have a graphUpdateScene script to change some tags, but it doesn’t work. If i try to remove the rotation from the grid graph and replace the points of the graphUpdate then it work fine.

Could you give me some advice on how i could acheive to make it work with my rotated grid graph ?

Thx !

I think that is a bug unfortunately. In the GridGenerator.cs script -> UpdateArea function, the bounds are used directly, but it should actually be multiplied by the inverseMatrix. This is the functions which is used in the development version:
`/** Calculates minimum and maximum points for bounds \a b when multiplied with the matrix */
public void GetBoundsMinMax (Bounds b, Matrix4x4 matrix, out Vector3 min, out Vector3 max) {
Vector3[] p = new Vector3[8];

p[0] = matrix.MultiplyPoint3x4 (b.center + new Vector3 ( b.extents.x, b.extents.y, b.extents.z));
p[1] = matrix.MultiplyPoint3x4 (b.center + new Vector3 ( b.extents.x, b.extents.y,-b.extents.z));
p[2] = matrix.MultiplyPoint3x4 (b.center + new Vector3 ( b.extents.x,-b.extents.y, b.extents.z));
p[3] = matrix.MultiplyPoint3x4 (b.center + new Vector3 ( b.extents.x,-b.extents.y,-b.extents.z));
p[4] = matrix.MultiplyPoint3x4 (b.center + new Vector3 (-b.extents.x, b.extents.y, b.extents.z));
p[5] = matrix.MultiplyPoint3x4 (b.center + new Vector3 (-b.extents.x, b.extents.y,-b.extents.z));
p[6] = matrix.MultiplyPoint3x4 (b.center + new Vector3 (-b.extents.x,-b.extents.y, b.extents.z));
p[7] = matrix.MultiplyPoint3x4 (b.center + new Vector3 (-b.extents.x,-b.extents.y,-b.extents.z));

min = p[0];
max = p[0];
for (int i=1;i<8;i++) {
	min = Vector3.Min (min,p[i]);
	max = Vector3.Max (max,p[i]);
}

}And called in UpdateArea like this:Vector3 min, max;
GetBoundsMinMax (b,inverseMatrix,out min, out max);`
I’m not sure if you can fix it yourself, I cannot send you the whole code because I have rewritten that function completely and it is not compatible with the rest of version 3.1.4 anymore, it requires 3.2.