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"

Pathfinding implementation for AI


I am designing the whole AI system of a FPS game for my master thesis. Before starting the implementation I have some questions about the pathfinding and navigation logic.

I know UE4 includes a pathfinding algorithm to find the best bath from A to B. However, this algorithm only takes into account distances. In my case, I would like to find the best path in the navmesh using an generated value that will take into account distances, enemies LOF, power-ups and so on. So what I want is a pathfinding algorithm that calculates paths in the navmesh using a different function than distance to evaluate the goodness of each point.

To do this, should I override the UE4 default pathfinding algorithm? Or there is a way to pass this generated value to the pathfinding algorithm?

[UPDATE] I have been looking the UE4 source code of different navigation classes and some of them have a methods like GetCost or CalcCost to get the cost of going from one node of the navmesh to another (I guess). So, Could be enough if I override this cost calculation methods instead of implementing all the pathfinding algorithm?

Any help will be useful.

Thank you!

Product Version: UE 4.10
more ▼

asked Nov 25 '15 at 07:11 PM in C++ Programming

avatar image

338 16 24 27

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

1 answer: sort voted first

The best way to override the pathfinding system is to change the algorithm that calculates the cost between two points. Here is how to do it.

more ▼

answered Apr 21 '16 at 11:19 AM

avatar image

338 16 24 27

(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