Support Forum

Grid graph local position

Hello! Please tell me how to change Grid Graph’s position? The level in my project is generated from rooms, each of which has Astar Path. Therefore, I need to move the Grid Graph to room’s position. For example, when the room is in position (-30, 30, 0), then Grid Graph should be in some position (-30, 30, 0).

In short, i don’t know how to change the values of the center (x,y,z) from the code.

AstarPath.active.data.gridGraph.center = someValue;
AstarPath.active.Scan();
1 Like