Import
temp
This commit is contained in:
parent
a87f0ed109
commit
a17810ffeb
114 changed files with 5184 additions and 5 deletions
23
Assets/otherTeam/OtherScripts/NavMeshJunk.cs
Executable file
23
Assets/otherTeam/OtherScripts/NavMeshJunk.cs
Executable file
|
@ -0,0 +1,23 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
public class NavMeshJunk : MonoBehaviour
|
||||
{
|
||||
private NavMeshAgent agent;
|
||||
[SerializeField] Vector3 destination;
|
||||
[SerializeField] GameObject Arriv;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
agent = GetComponent<NavMeshAgent>();
|
||||
destination = agent.destination;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
destination=Arriv.transform.position;
|
||||
agent.destination = destination;
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue