Nav mesh
This commit is contained in:
parent
1f41eaa61c
commit
71cfc3b3a3
7 changed files with 1494 additions and 23 deletions
14
Assets/Scripts/Patron.cs
Normal file
14
Assets/Scripts/Patron.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class Patron : MonoBehaviour {
|
||||
|
||||
Vector3 dest;
|
||||
|
||||
void Awake() {
|
||||
Vector3 pos = GameObject.Find("node3").transform.position;
|
||||
NavMeshAgent nva = GetComponent<NavMeshAgent>();
|
||||
nva.SetDestination(pos);
|
||||
nva.updateRotation = false;
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/Patron.cs.meta
Normal file
8
Assets/Scripts/Patron.cs.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b933d79988a624405b43ff0fb8c3d527
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
Loading…
Add table
Add a link
Reference in a new issue