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"

AI using Navmesh + a Vector

I have a sheep AI currently working in my game that uses a navmesh to find random places to path towards. I intend on having a function that will output a random vector to the AI to help it determine where it should go and at what speed. Will these two things work together with the navmesh automatically?

For example, lets say a sheep was at position 0,0,0 and it received a random vector of 5,5,10, will the sheep begin flying in the air since z = 10? Or will it just path along the navmesh to the best of its ability using that vector?

If not how can I go about this? Should I just create an endpoint with the vector to tell the sheep to move towards at a certain speed? How can I ensure that the endpoint will be on the navmesh and not in the air or below the ground on a hilly terrain?

Thanks for the help!

Product Version: Not Selected
Tags:
more ▼

asked Jan 21 '15 at 06:14 PM in Using UE4

avatar image

rockM
10 4 4 5

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Pathfinding request destination is being projected to navmesh before kicking off the pathfinding algorithm, so as long as your destination is within default navigation query extent (configurable via Project Settings -> Navigation System -> Supported Agents ) from navmesh you're fine. C++ pathfinding API allows you event to specify a custom extent yourself.

Cheers,

--mieszko

more ▼

answered Jan 21 '15 at 06:19 PM

avatar image

MieszkoZ STAFF
7.2k 223 56 408

avatar image rockM Jan 21 '15 at 06:48 PM

Thanks Mieszko!

(comments are locked)
10|2000 characters needed characters left
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