playMaker

Author Topic: Unity Pathfinding  (Read 1731 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Unity Pathfinding
« 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?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: Unity Pathfinding
« Reply #1 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
« Last Edit: February 01, 2017, 08:36:12 PM by Carmichael »

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Unity Pathfinding
« Reply #2 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. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no