public override void RelocateNodes(Matrix4x4 oldMatrix, Matrix4x4 newMatrix)
{
if (this.vertices == null || this.vertices.Length == 0 || this.originalVertices == null || this.originalVertices.Length != this.vertices.Length)
{
return;
}
for (int i = 0; i < this._vertices.Length; i++)
{
this._vertices[i] = (Int3)newMatrix.MultiplyPoint3x4(this.originalVertices[i]);
}
for (int j = 0; j < this.nodes.Length; j++)
{
TriangleMeshNode triangleMeshNode = this.nodes[j];
triangleMeshNode.UpdatePositionFromVertices();
if (triangleMeshNode.connections != null)
{
for (int k = 0; k < triangleMeshNode.connections.Length; k++)
{
triangleMeshNode.connectionCosts[k] = (uint)(triangleMeshNode.position - triangleMeshNode.connections[k].position).costMagnitude;
}
}
}
base.SetMatrix(newMatrix);
NavMeshGraph.RebuildBBTree(this);
}