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