Support Forum

GetNodesInRegion on rotated Graph

Hello. I need get nodes in region on rotated GridGraph ! It is possible ? My graph rotated y axis 45.
So i need get nodes in region and respect rotation like if world is rotated 45 degrees, not world position and rotation but local!


It sounds like you want the overload of GetNodesInRegion that takes an IntRect?

new IntRect(x,z,w,h)
x and z its a node count in x and z raw ?

Yes, those are all node counts in the graph.

You can also use GridGraph.transform.* to convert between world space and graph space.

1 Like