projet-massimo-pfe/PFE OmniVR/Assets/Scripts/movementNavMeshTest.cs
jimmy tremblay-Bernier 86fbe09b20 initial commit
2022-03-12 20:32:56 -05:00

18 lines
423 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class movementNavMeshTest : MonoBehaviour
{
private Vector3 playerPos;
public NavMeshAgent playerAgent;
// Update is called once per frame
void Update()
{
playerPos = GameObject.FindGameObjectWithTag("Player").transform.position;
playerAgent.SetDestination(playerPos);
}
}