NavMesh issues

Hello,

i try to have a map where one can place/remove props(considered as obstacles)

it is for a strategy kind of game

but if i create a navmesh, it does not take these obstacles in consideration,
unless i merge obstacles and map to the same node

wich i don’t want, cos i also need to remove these props later
so i cant merge them , i need to be able to access them as nodes, so keeping the hierarchy of the world intact

i tried with a duplicate of landscape that i merge with a bounding box of the added obstacle

[java]
//------------------ create bounding volume for added prop
Geometry box=BuildBoxFromProp(node);
((Node)landscapeDuplicate).attachChild(box);
//---------------------------- merge landscape duplicate + bounding volume
GeometryBatchFactory.optimize((Node)landscapeDuplicate);
//--------------------------- create navmesh with optimize
Geometry ground=(Geometry) ((Node)((Node)landscape).getChild(0)).getChild(0);
Mesh me=ground.getMesh();
NavMeshGenerator generator= new NavMeshGenerator();
Mesh optiMesh = generator.optimize(me);
navmesh.loadFromMesh(optiMesh);
//--------------------------------------------------------------------i am screwed, cos if i want to remove a prop, i need to rebuild a new duplicate from scratch
[/java]

but if i want to remove one prop, i would have to rebuild the whole landscape duplicate without adding a bounding box for the obstacle i removed

is there a way to build the nav mesh from
1 - landscape mesh
2 - a separate mesh hierarchy of all obstacles that would be taken into account by the navmesh algo

[edit : in game programming gems, there is a sample code that uses 1 mesh for the map, 1 mesh for the map props]

???

Try forum search - last replied to 19 hours ago:

http://hub.jmonkeyengine.org/forum/topic/dynamic-navmesh/

<cite>@zarch said:</cite> Try forum search - last replied to 19 hours ago:

http://hub.jmonkeyengine.org/forum/topic/dynamic-navmesh/

yes i posted things also on that thread

but that was before i realize the issue

btw it does not answer my question

Batch it and throw away the batch after you computed the path.

Btw there is a point where it becomes useless to try to bend an external library into the imagined form and instead implementing the functionality yourself makes more sense.

Generally for this I’d make a global navmesh and then just add obstacle support and add/remove these.

<cite>@normen said:</cite> Btw there is a point where it becomes useless to try to bend an external library into the imagined form and instead implementing the functionality yourself makes more sense.

Generally for this I’d make a global navmesh and then just add obstacle support and add/remove these.

yes but i don’t know how to do that as i just use the navmesh generator “as is”

so if understand, the current monkeyzone navmesh does not support this… well i’ll try to port the c code that i have
i think it does the trick

thx normen :wink: