Dear everybody,
I am writing my thesis project and am to extend software based on JME3.
I have a scene and can generate a Navmesh for that scene.
What I would like to do is weigh that Navmesh.
That in itself shouldn’t be a problem.
What is a problem though is finding the code where the navmesh generation is implemented.
I am certain it happens inside critterai, but I cannot find the code for it to save my life.
I can find a java implementation ( GitHub - bkmeneguello/cai-nmgen ),
I can find the code in jme3ai that uses critterai (doc-examples/NavMeshGenerator.java at master · jMonkeyEngine/doc-examples · GitHub), but I can’t find the thing itself.
Can someone point me into the right direction, please?
Yeah, I’ve posted the link to this repo in my post.
The thing is that I am not sure if that’s the actual implementation used in critterAI and therefore, JME3ai.
Then again, “package org.critterai.nmgen”… Well… I guess that’s the one used in JME3ai?
Can anyone confirm this is the implementation used?
Thanks!
you mean me? im not using JME ai. but looking at topic
Get the nearest cell to the supplied position
and place the returned position in that cell.
this mean you just provide location and it auto search nearest cell and if its in cell, then position inside cell, if not, then closest location to nearby cell.
no, like in recast, nearest point mean nearest point, you can calculate straight line from A to B only.
pathfinding can find path only on traversable navmesh.
if point you provide into method is on navmesh i assume this method is only to get position on it, not to calculate path, you probably need find other method.
When using jme3AI I would think since its such a narrow use library maybe when you build the navmesh you should only pass in traversable geometry.
Mark your geometry with materials or some other method that will allow you to grab only those traversable geometry.
Use the slope, height, radius other settings to refine those areas.
With recast, you have Area Types and Ability flags where you set an area by type like ground, water, road, etc and then you use ability flags on those polygons like walk, swim, jump, disabled etc and then use a filter tailored to the character which says if they can walk, swim, or jump so the filter will not return any polygons that the character cannot traverse.