How to show where the AI is moving to

Hi,

I know TWO ways to do it. First is to use a node called ‘FindPathToLocationSynchronously’;
Follow my graph;
Note that for using this method, you must have nav mesh volume in your scene

Second, this is a tricky way to do it. Follow my graph;

In the second approach, you should go all the way from A to B by your player pawn. then save all the debug lines (points between lines) into an array or something, then when the time comes, (the quest is activated for instance) just call back all the data from your array and draw them.

  • Advantage over first approach;

It allows us to draw lines over invalid paths or even jumping lines.

  • Disadvantage over first approach;

Only works if your start and end locations are static points.

Update;

The images are reordered.

Hope it helps.

Regards,

Just wondering after i tell an AI move from A-B, how could i show the path it will take as a line or something?

Hey, thanks a lot for your response, i managed to get something working with your help, it’s a bit glitchy and i’m not getting the dashed lines in your second method but it does the job hah

I see. That’s because it depends on your FPS (frame per second) and your pawn max speed. If you want to have a perfect dashed line (and if you don’t want to change your pawn max speed, simply use a delay node after your event tick and try to manually find a proper delay time for it. This is the simplest way to achieve it. There are also more advanced ways like try to use a branch notify inside your pawn animation sequence and at certain times call it and …

Regards,