Whats a navmesh

There are no stupid questions, just stupid answers.
5 posts Page 1 of 1
Code_Man
Posts: 55
Joined: Fri Jan 26, 2018 9:12 pm
by Code_Man » Tue Sep 11, 2018 10:41 am
Simple question, what is a navmesh and how can i use it?

It seems to be an object, but i could not find corresponding object in the documentation.
Duion
Posts: 1120
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Sep 11, 2018 12:38 pm
What the bots use for navigation, just generate it and the bots can use it, you can even spawn a test bot in the navmesh editor and order him around to test it.
Azaezel
Posts: 413
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Sep 11, 2018 11:00 pm
should be noted that
function AIPlayer::randomPoint(%this, %duration)
{...
   %this.setMoveDestination(%pos);
...}
differs from
function AIPlayer::pickWayPoint(%this,%trigger)
{...
               %this.setPathDestination(%waypoint.getPosition());
...}
differs from
function AIPlayer::PathToNearest(%this)
{
   %this.followObject(%this.enemy, %this.repathTolerance);
}
the first ignores the navmesh and just goes to a 3d spot (and will keep going that direction reguardless of anything in the way),
the second uses the navmesh to attempt to path around obstacles to a point.
the third uses the navmesh to follow a mobile object around.

edit: you'll find that
https://github.com/GarageGames/Torque3D ... .cpp#L1177
https://github.com/GarageGames/Torque3D ... r.cpp#L842 and
https://github.com/GarageGames/Torque3D ... r.cpp#L917
Code_Man
Posts: 55
Joined: Fri Jan 26, 2018 9:12 pm
by Code_Man » Wed Sep 12, 2018 11:02 am
@
User avatar
Azaezel


Interesting, the last two methods seem not documented.
They are part of the AIPlayer class in c++?

I still need some more answers on how to use the navmesh.
Can i just place it anywhere and have it cover an area?
Does it work only on terrain or can i use it in conjunction with solid TSStatic objects?
Will it only work when i place it or can it update itself even after i move some solid objects?
Do the navmeshes rely on nodes or is it place and go?
Duion
Posts: 1120
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Sep 12, 2018 1:11 pm
@
User avatar
Code_Man

Don't worry it works just fine, only updating it real time is a bit of a problem, since it is a big file and takes a while to generate, so you can only update small parts of it in realtime, like a cell, which there is even a button for in the editor.
5 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests