Jump to content

Whats a navmesh


Code_Man

Recommended Posts

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/blob/561f010f2e6411d8253d23f0cfcff794e81f60bf/Engine/source/T3D/aiPlayer.cpp#L1177

https://github.com/GarageGames/Torque3D/blob/561f010f2e6411d8253d23f0cfcff794e81f60bf/Engine/source/T3D/aiPlayer.cpp#L842 and

https://github.com/GarageGames/Torque3D/blob/561f010f2e6411d8253d23f0cfcff794e81f60bf/Engine/source/T3D/aiPlayer.cpp#L917

Link to comment
Share on other sites

@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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...