Because I have try to make a navmesh file before, but for try .obj file is Better.
I have edit my code, but this not fix the problem.
EDIT:
Code:
// Save to .obj
std::cout << "Make file: " << areaId << ".obj" << std::endl;
std::ofstream fs("Dump.obj", std::ios::out | std::ios::trunc);
for (int i = 0; i < vertices.size(); i++)
{
fs << "v " << (vertices[i].x) << ' ' << (vertices[i].y) << ' ' << (vertices[i].z) << '\n';
}
fs << '\n';
for (int i = 0; i < indices.size();)
{
fs << "f " << (indices[i++]+1) << ' ' << (indices[i++]+1) << ' ' << (indices[i++]+1) << '\n';
}
fs.close();
std::cout << "File saved." << std::endl;
This is the new code but the result is same.