Jump to content

Recommended Posts

Posted

Trying to learn to use navmesh and navpath, but I keep getting this error.

"No NavMesh polygon near visit point (105.3, 88.7, 513.094) of NavPath 21142"


There are indeed blue navmesh polygons around it according to the editor.

This is all that is needed to create a navpath from script right?

[code2=BBCODE40_TORQUESCRIPT

]%navPath1 = new NavPath()

{

mesh = Nav;

from = %demoAI.getPosition();

to = NavTest.getPosition();

};

%navPath1.plan();[/code2]

Posted

I get this sometimes as well, it is console spam, but I never bothered to create a navpath from script, the bots take it automatically, you just need to tell them where to go.

Posted

If I try to tell my bot to just move directly to a location he just runs into a mountain and does not navigate.... is there something I am forgetting in order to get the bot to acknowledge the NavMesh? Because in the navigation editor if I spawn the test bot and click around at various points that one works great.

Posted

Looked at the source code and figured it out.... you have to use setPathDestination() instead of setMoveDestination() and then he uses the navmesh and finds his way there. I guess the navPath object is pretty pointless.

Posted

Yes, exactly setPathDestination vs setMoveDestination, I have a fallback in case my bots cannot find a navMesh, then they will automatically fall back to setMoveDestination, so they will work in any environment.

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...