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"

Find Path to Location Synchronously - dynamic navmesh path recalculation issues

I am trying to implement AI for an RTS game with tanks. I have created basic tank pawns (without character movement component) and I am currently trying to get them to respond properly to a custom MoveTo command.

Currently, I am using the Find Path to Location Synchronously node to generate a list of points that should get a pawn to the specified destination. Then every tick, the tank pawns try to naively self navigate to each point along the path by simulating player input. The tank pawn is setup like this: https://imgur.com/a/ef0M2

The issue occurs when the path points are being recalculated in the NavigationPath object. When I try to access a point of the path using current point index the pawn is keeping while navigating, it gets stuck as the point it is heading towards keeps alternating between two positions, like so: https://www.youtube.com/watch?v=2v0t1QOfwoY

Alternatively, I have tried to cache the point at the current index, and change it after it has been arrived at. Still the pawns exhibit some abberant behaviour: https://youtu.be/yzYFjGTMmeg . For some reason, the navigation path keeps slipping into an "invalid" state (as reported by it's IsValid function - this is observable by "true" being printed in top-left - which is the output of the function), but only for a frame or too. This results in the jittery movement of the pawn.

I have also tried turning off recalculation of path, which yields reasonably satisfying results, but the pawns keep crashing into each other (since they are not aware of each other's effect on the navmesh)

I have only just begun working with navmeshes and navigation, and the ability to generate a path around the world is critical for the game. Does anyone have any suggestions on how to fix this/improve this, or any alternatives to the problem? (I have tried using character movement on the tanks, let's just say I won't be going this way).

Thank you for your time.

Product Version: UE 4.14
more ▼

asked Dec 31 '16 at 01:04 AM in Blueprint Scripting

avatar image

6 2 3 4

avatar image ColdSteel48 May 04 '18 at 01:54 AM

Have you found something on it ? “Naively self navigate” meaning just a basic interpolation?

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

0 answers: sort voted first
Be the first one to answer this question
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