• 10
• 9
• 12
• 14
• 15

# Do I have a use case of a Navigation Mesh Manager?

## Recommended Posts

I know if I open up a mesh, the navigation mesh will be either generated or loaded from file with the asset.

But in some uncommon cases, like I sometimes attach a navigation mesh with a truck, and that

they will be instanced out, I want to treat them as separate entities and they only differ in their transformations.

Then when I open up the truck mesh, I would call the navigation mesh manager and if they already exist,

I don't load them up anymore, do I have a case?

====

Another question is the interface is going to be weird, because

NavigationMeshMgr::getInstance()->getMesh("xxx.nav");


would not supply any arguments,

but I need to give it the object geometry, the cell size,  cell height etc,

I am thinking about using some interfaces and they must be called before retrieving the navmesh

class NavigationMeshMgr
{
NavigationMeshMgr() { m_fCellSize = 0; ... }

void setCellSize(float fCellSize) { m_fCellSize = fCellSize; }
///
};
{
if (m_fCellSize == 0) return;
// get the mesh
}


Note that When I have multiple navmeshes, how do I test the parameters, each set will have different ones.

This only fits one cellsize for all navmeshes....

Is it useful and worth the effort to do these things?

Thanks

Jack

Edited by lucky6969b