x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to check if a point is reachable on NavMesh

Sorry for asking what must be an obvious newbie question. I searched for a while and couldn't figure it out.

How do I check if a given target point is reachable on the NavMesh? For example, I want my critter to run from the player so I create a vector from the player to critter, rescale it, and add it to the critter location to get the target. But if the target point is outside the NavMesh (e.g., if the critter is in a corner) then the critter will just stand in the corner. I'd like to say that if the first approach doesn't yield a valid point then just go to a random location.

Please advise on how to check if a given point is reachable on the NavMesh or a better way to accomplish the above.

Goal is to do this using blueprint.

Thanks, -X

Product Version: Not Selected
Tags:
more ▼

asked Nov 23 '14 at 04:25 AM in Blueprint Scripting

avatar image

Xarol
353 21 32 39

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Xarol,

The best way to do this is to use the "is Valid" node for AI Navigation. If the point is not valid, run the check again to find a proper location for your AI to move to.

more ▼

answered Nov 24 '14 at 04:59 PM

avatar image Xarol Nov 25 '14 at 07:15 PM

Thanks for the quick response. I tried doing that but I don't know how to feed my navigation mesh into the FindPathToLocationSynchronously in order to get the NavigationPath to feed into IsValid.

My Navigation Mesh is built into the level but when I try to click on the PathFinding context parameter for FindPathToLocationSynchronously it doesn't show my navmesh.

So how do I get the navmesh to feed into FindPathToLocationSynchronously? Or should I be using some other blueprint tools?

Thanks.

avatar image Adam Davis STAFF Nov 25 '14 at 07:21 PM

Hi Xarol,

Can you post a screenshot of your blueprint? I may get a better idea of how to help if I can see what is going on. Thank you!

avatar image Xarol Nov 28 '14 at 11:23 PM

I'll try to post when I get a chance but I don't think that will help.

Here is my question again: if I have built a navigation mesh in the level, how do I feed this into FindPathToLocatonSynchronously or how do I feed it into the MoveTo behavior tree node? It seems like the tutorial at (https://wiki.unrealengine.com/AI_Bot:_Blueprint_Scripting:_AI_Behavior_Tree_%26_NavMesh:_Part_1) builds a navmesh but I don't see how he connects this to anything else.

Any suggestions?

Thanks, -X

avatar image RoseLi Apr 01 '17 at 02:30 AM

just use the "is Valid" node? i use the"Is Valid aiLocation",is that right?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question