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"

Creating a custom pathfinding algorithm

Hi,

I'm designing a 2D RTS and I wanted to confirm if the approach I'm taking is the correct one. I need to have in mind the different of height between the different terrains so that the certain units cannot traverse all terrain, despite the supposed different in heights.

For blocking terrain, I create an actor which modifies the nav mesh via a Nav Modifier volume and I was thinking of placing height information in that volume and then modifying the A* algorithm in some way to use those actors.

Is there a better way to do this? And if not, what are the correct functions to override? I have seen that the engine has been updated since this post, so I wanted to know if it is still done in the same way.

Product Version: UE 4.15
Tags:
more ▼

asked May 26 '17 at 10:51 AM in C++ Programming

avatar image

JackcaJ2314
64 8 18 22

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

1 answer: sort voted first

Hey,

I’m also working on rts, and I have to do custom PF.

For that I choosed a hybrid approach: Normally I donpathing on a built in NavMesh, but I also generating a 2D grid (which Increate by tracing the NavMesh).

Why GRID ?

Since UE4 built in stuff is bad at collisions avoidance - I decided to use grid with filters. When I have a collision or likely to have a collision I am creating a filter which overrides impassible cells of the grid and firing up an Astar.

I’m also planning to add custom lightweight RVO or ORCA alg to pre resolve collision - if it resolve then fine - if collision happens I will chose a unit (or multiple units) to be of a higher priority they will Astar around lower priority units (while lower priority will remain still (no movement) until the higher priority unist will pass around them).

more ▼

answered Nov 07 '18 at 07:05 PM

avatar image

ColdSteel48
532 6 18 23

(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