mirror of
https://github.com/ConjureETS/VZ.git
synced 2026-03-24 10:21:14 +00:00
21 lines
340 B
C#
21 lines
340 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class Pathfinding : MonoBehaviour {
|
|
|
|
public Transform target;
|
|
NavMeshAgent agent;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
agent = GetComponent<NavMeshAgent> ();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
agent.SetDestination (target.position);
|
|
|
|
}
|
|
}
|