Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Rabagast on January 31, 2017, 03:38:24 AM

Title: Unity Pathfinding
Post by: Rabagast on January 31, 2017, 03:38:24 AM
Hi!

I try to figure out how to use this Pathfinding with Playmaker.
I found the documentation and start to read. I created ground mesh and some wall mesh. And then bake. I created the script in the documentation to move the Agent to the destination.

Code: [Select]
// MoveTo.cs
    using UnityEngine;
    using System.Collections;
   
    public class MoveTo : MonoBehaviour {
       
       public Transform goal;
       
       void Start () {
          NavMeshAgent agent = GetComponent<NavMeshAgent>();
          agent.destination = goal.position;
       }
    }

My simple question is:
What kind of actions do I use to do this with Playmaker?
Title: Re: Unity Pathfinding
Post by: Ofonna on January 31, 2017, 04:17:38 AM
you would need to download the pathfinder package writing scripts isn't neccessary. after doing that you get a lot f built in functions
Title: Re: Unity Pathfinding
Post by: Rabagast on January 31, 2017, 09:04:59 AM
Hi!
Sorry, I forgot to tell you that I already have the Pathfinding Actions for Playmaker.
But I found a very small and basic tutorial, so I got it to work. Now it move to the destination and avoid the walls. I will start to experiment more from here. :)