playMaker

Author Topic: NavMesh help  (Read 1294 times)

sourbeck

  • Playmaker Newbie
  • *
  • Posts: 3
NavMesh help
« on: November 06, 2016, 04:10:02 PM »
Hello guys,

I'm new at both unity and playmaker.  I have a doubt about what NavMesh can do.

By now I have a 7x7 square grid and a character stuck in the central square. Clicking any square will turn it into an walkable square.

I want the character to check after each click if there is a path to the edges, and if there are two or more, which is the shortest.

As I have limited programming skills, my solution was to check if he could walk to his adjacent squares, and after to the adjacent of this last one, continuing until reach the edge.

But I've noticed that would be a ridiculously amount of loops to do that, and as the idea of the game is to have characters with different weights, it would have to do all loops for weight 1,2, etc.

So, my doubt is: can NavMesh recheck the best path when I click and a square starts being walkable? If yes, could it be done through playmaker?

Thank you
« Last Edit: November 06, 2016, 04:18:24 PM by sourbeck »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: NavMesh help
« Reply #1 on: November 06, 2016, 08:05:17 PM »
The Navmesh system will always select the shortest path that it can take as soon as it is given a destination- to re-check a path the navmesh agent would "calculate" a path- I'm pretty sure there's a PM action that does that-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!