NavMeshControl new implementation

Hi,



i am about to develop a new control similar to the MotionPath but it will take as input for the movements

the path calculated from the computePath executed on the Navigation map, is there something already

available or i can go on?

Anything that has been developed for pathfinding is in MonkeyZone.

The path and the pathfinder in MZ isn’t necessarily optimal: it fails to skip nodes that it can see past. So you will have to make the control look ahead and future nodes (starting from the end and working back) and see if it has a direct line of sight to it, and if to, head directly for it. You can perform this check every time it reaches a node.

Ok Sproleg,

actually the control built in MonkeyZone doesn’t implement the update method,

so i will beging with the development, i will let you know when i have something working.

cool, good luck :slight_smile:

hehe thank you

Hi Sproleg,

i saw that the compute path algorithm is repeiting the point when computing the path,

something like this :



(-2.463572, -3.0517578E-5, 57.340454)

(-2.463572, -3.0517578E-5, 57.340454)

(5.645462, -3.1473952E-5, 54.20558)

(52.645462, 1.4999685, 53.20558)

(52.645462, 1.4999685, 53.20558)

(52.645462, 1.4999684, 53.20558)





Is this the problem that you were talking about?

well that’s one of the many problems it has :slight_smile:

My local version of it removed those duplicates.

aahaah ok i will have to study the actual implementation of the pathfinding well,

i was taking a look at the detour system made by the same guy that implemented the

navigation mesh and it’s very interesting…

I haven’t looked at the detour stuff, but I did add some steering code into the jmonkeyplatform-contributions/AI project.

If you want to play around with Steering (useful with nav meshes) check it out and give it a try. I haven’t really announced it is there yet, it needs some documentation and I haven’t integrated it with anything so it might change. But the base code is there and it works quite well. I developed it from this site/paper.

Ok , thank you it will be useful,

do you have a stabler version of the pathfinding stuff?

I want to study it well for the purpose of modifying in the future and i wish to correct the stuff that is

not working well ,if you want we can split the tasks.

Ya I have it hanging around here still. I’m not using it any more however so it probably isn’t as good as it could be. It is based off the MZ version but has a lot of the issues fixed, and some debugging in there (so you can render the triangles of the nav path).

Never used this hosting site, let me know if it doesn’t download navmesh.zip

Ok perfect i downloaded it , give me some days and i’ll let you know,

i work of this stuff at night.

@Sploreg said:
Ya I have it hanging around here still. I'm not using it any more however so it probably isn't as good as it could be. It is based off the MZ version but has a lot of the issues fixed, and some debugging in there (so you can render the triangles of the nav path).
Never used this hosting site, let me know if it doesn't download navmesh.zip

If this is complete perhaps we can replace the version in MZ with this one?
We can also make this into a jME SDK plugin. Pathfinding is a very useful feature to have

In MonkeyZone this classes where part of a control that wasn’t completed,

i don’t think that would do as plugin, it would be better to be integrated in a control

before.

@geniodella said:
In MonkeyZone this classes where part of a control that wasn't completed,
i don't think that would do as plugin, it would be better to be integrated in a control
before.

A plugin can be a simple java library, one doesn't exclude the other. They're just easier to install and update.

That’s ok then,

i would like to test it a little bit though.

What the pathfinding routine I uploaded needs is some refactoring to pull out the A* algorithm, so it can be used in other places as well. I think with that done then it would be great to release.