### Navmesh

Scripting questions, discussions, etc

#### Re: Navmesh

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
Yeah after I get in game I do a build, tell the bot to follow me and all is well.
I never touched any of this code, first time I tried to use it.
I do get alot of spam on this:
No contours in rcContourSet for NavMesh 21533
Is there a depth issue with this object? like if I place it right on the surface or slightly below ?

Sorry to be such a pain....

#### Re: Navmesh

Code_Man
Posts: 66
Joined: Fri Jan 26, 2018 9:12 pm
I have been trying to use the navmesh, but it seems setPathDestination does nothing and without any documentation ive no idea how to debug this.

#### Re: Navmesh

Duion
Posts: 1377
Joined: Sun Feb 08, 2015 1:51 am

@
Code_Man
no need to debug the Navmesh, since it works fine, you "only" have to debug your implementation of whatever you try to do.

In the Navmesh editor there is even a button to spawn a test bot and you can direct him around, then you can see how well the Navmesh works, so that is proof that it works.

#### Re: Navmesh

Code_Man
Posts: 66
Joined: Fri Jan 26, 2018 9:12 pm
Im pretty sure i used the navmesh move command properly, but will tripple check then.

I will give the navmesh test bot a try.

#### Re: Navmesh

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
Well navmesh works better now that I altered a few things. I have a situation where I have 3 nav meshes but only one should be active per mission so I load the proper one for the mission. Changes I was making did not save properly so I have taken to adding the mesh to the mission, do a build, then delete the saved one, save the game and it all updates properly. During the mission I load the proper mesh out of the mission file and everything seems to work ok now. Thanks for all your help...

#### Re: Navmesh

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
Ok back to this. I don't know if this is the right way but it works. I find when I edit the mesh it won't over write the levels/zone.nav so I delete that file, edit and save the game, all is well. Navmesh works fine at this point.
I had a question before about my character driving a vehicle into the area and the bots collide with it and you said "Only thing you can do is rebuild parts of the navmesh, which can happen fast enough" ... Can you tell me how to rebuild parts around where the vehicle sits. Seems if I move the vehicle within the mesh and jump out I have to do a instant rebuilt ?
Thanks for any help

#### Re: Navmesh

Azaezel
Posts: 463
Joined: Tue Feb 03, 2015 9:50 pm

#### Re: Navmesh

Bloodknight
Posts: 235
Joined: Tue Feb 03, 2015 8:58 pm
@ Code_Man I'd double check, but setPathDestination is specifically for path nodes which is different to setMoveDestination which is a pathless command to set the destination of the AI, it is the latter command that uses the navmesh.

@ Hodo33 I think Az is pointing out that you can update smaller parts of the navmesh in a more dynamic fashion (runtime, particularly id, expect without looking in more detail), a full rebuild isn't really warranted apart from probably when doing more development work on a level, i suspect the documentation posted by steve will help muchly in this regard

#### Re: Navmesh

Azaezel
Posts: 463
Joined: Tue Feb 03, 2015 9:50 pm

right. sorry. yeah. to use a script example from our objective-doors:

Code: Select all

function staticshapeData::onOpen(%this,%obj) { NavmeshUpdateAll(%obj,false); //false = ignore for cutout purposes, true = include }
the second links there as an alias cause the first methods got a fairly unintuative name, so likely deprecate that at some point.

#### Re: Navmesh

Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
I used the NavmeshUpdateAll and the NavMeshUpdateOne got in the editor and there is no clear area around the vehicle, same with hovercraft
I open the editor and where it is blue the bots can walk. After calling this update it is still blue and bots still collide.
The vehicle has a collision on it and I did a getWorldBox to make sure that was valid as well... any ideas ?

#### Who is online

Users browsing this forum: No registered users and 1 guest