Function RecastGraph.TranslateInDirection

TranslateInDirection (int dx, int dz)

Moves the recast graph by a number of tiles, discarding old tiles and scanning new ones.

Public
IGraphUpdatePromise TranslateInDirection (

int

dx

Number of tiles along the graph's X axis to move by.

int

dz

Number of tiles along the graph's Z axis to move by.

)

Moves the recast graph by a number of tiles, discarding old tiles and scanning new ones.

Note

Only translation in a single direction is supported. dx == 0 || dz == 0 must hold. If you need to move the graph diagonally, then you can call this function twice, once for each axis.

This is used by the ProceduralGraphMover component to efficiently move the graph.

All tiles that can stay in the same position will stay. The ones that would have fallen off the edge of the graph will be discarded, and new tiles will be created and scanned at the other side of the graph.

Return

An async graph update promise. See IGraphUpdatePromise