Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

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

This topic is 569 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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; }
    ///
};
NavMesh* NavigationMeshMgr::getMesh(const std::string& l_name)
{ 
     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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!