Cristianwolf712 Posted March 5, 2013 Share Posted March 5, 2013 Hi all, during my implementation of custom NPC's and navigating them arount the world I ran in some trouble with my game idea. For my RPG/RTS-game the player have the ability to build various buildings, like walkable walls and towers. The building implementation is successfully done, but I have a problem to get the pathfinding work. As far as I red, the Navigation with NavSector will be straight through it, and doesn't use any surfaces in count, in fact if I want to use the Player-class. So, for a walkable tower with stairs i have to use a NavMesh. Problem: There aren't any support to navigate between two navmeshes, which isn't very useful for e.g. connecting walls. So my question is: Are anybody here who have used a successful navigation area for a complex scene (terrain, buidlings, walkable floors?) and are ready to share the knowledge with me? @Unigine: Are their any plans to implement the modifying of navmeshs dynamically during runtime? I have an idea to implement that on my own (using ObjectMeshDynamic to change the navmesh and load that into the current NavMesh). It would be great if Unigine can support them, because no engine I have used in past (Unreal,CryEngine) have that feature. And in my opinion it would be a great advantage for an game engine to support that feature instead of using a middleware product. Link to comment
manguste Posted March 7, 2013 Share Posted March 7, 2013 Christian, Yes, NavigationMesh works with one mesh. But there's no problem with regenerating NavigationMesh in real-time. Just as you described, you can modify geometry via ObjectMeshDynamic, regenerate NavMesh and have pathfinding work for new environment. That's the pipeline we could suggest for your use case. Link to comment
Cristianwolf712 Posted March 7, 2013 Author Share Posted March 7, 2013 Thanks manguste, but are their any thoughts about implementing that as a core feature for the engine? As I wrote above, it would be a great benefit for Unigine to support dynamic navigation meshes. No current top game engine, like Unreal, CryEngine or Unity have that feature and it wouldn't be hard to implement that with ObjectMeshDynamic. Link to comment
manguste Posted March 11, 2013 Share Posted March 11, 2013 Cristianwolf, Ok, I got you point that you what to have it done under the hood. Our developers will surely take that as a suggestion, but I'm afraid not in the near future. For now, please use this more low-level approach. Link to comment
frustum Posted August 9, 2013 Share Posted August 9, 2013 NavigationMesh will have setMesh()/getMesh() methods. You will able to pass a dynamic ObjectMesh into setMesh() function to update navigation topology: ObjectMesh mesh = new ObjectMesh(NULL,1); // create mesh geometry // mesh.addEmptySurface(...) // mesh.setVertex(...) // mesh.setIndex(...) navigation.setMesh(mesh); delete mesh; Link to comment
Cristianwolf712 Posted August 9, 2013 Author Share Posted August 9, 2013 Sweet. That will solve the problem. Thanks. Link to comment
Cristianwolf712 Posted August 30, 2013 Author Share Posted August 30, 2013 One question: will setMesh allow only the new added part of the mesh, or the complete mesh for the whole map? A suggestion: Because the evaluation kit doesn't allow any plugins, are there any chance that unigine will support Recast in future? (http://code.google.com/p/recastnavigation/) Best Regards Link to comment
frustum Posted September 7, 2013 Share Posted September 7, 2013 To incremental geometry addition you can use the following approach: getMesh(), append geometry, setMesh(). The new evaluation kit should contain C++ API for plugins. So you can create a Recast plugin without problem. Link to comment
Recommended Posts