Navmesh

Scripting questions, discussions, etc
28 posts Page 2 of 3
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Wed Jul 25, 2018 3:57 am
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....
Code_Man
Posts: 66
Joined: Fri Jan 26, 2018 9:12 pm
by Code_Man » Tue Oct 09, 2018 11:55 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.
Duion
Posts: 1377
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Oct 10, 2018 1:02 am
@
User avatar
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.
Code_Man
Posts: 66
Joined: Fri Jan 26, 2018 9:12 pm
by Code_Man » Wed Oct 10, 2018 1:05 am
Im pretty sure i used the navmesh move command properly, but will tripple check then.

I will give the navmesh test bot a try.
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Fri Oct 26, 2018 6:39 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...
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Tue Mar 05, 2019 5:50 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
Azaezel
Posts: 463
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Mar 05, 2019 5:54 pm
Bloodknight
Posts: 235
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Tue Mar 05, 2019 9:28 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 :)
Azaezel
Posts: 463
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Mar 05, 2019 9:32 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.
Hodo33
Posts: 86
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Wed Mar 06, 2019 7:46 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 ?
28 posts Page 2 of 3

Who is online

Users browsing this forum: No registered users and 1 guest