Function GridGraph.ClipLineSegmentToBounds

ClipLineSegmentToBounds (Vector3 a, Vector3 b, out Vector3 outA, out Vector3 outB)

Clips a line segment in graph space to the graph bounds.

Protected
bool ClipLineSegmentToBounds (

Vector3

a

Vector3

b

out Vector3

outA

out Vector3

outB

)

Clips a line segment in graph space to the graph bounds.

That is (0,0,0) is the bottom left corner of the graph and (width,0,depth) is the top right corner. The first node is placed at (0.5,y,0.5). One unit distance is the same as nodeSize.

Returns false if the line segment does not intersect the graph at all.