Quantcast
Channel: Questions in topic: "follow"
Viewing all articles
Browse latest Browse all 536

Navmesh agent enemy moving to players last seen position

$
0
0
Dear coders, For some reason, for some reason , using the navmesh agent with the script below, my Agent keeps moving to the last seen position for the player, and not its current position. Im using 2019.4.01f. Any help would be much appreciated public class Follow : MonoBehaviour { public Transform player; NavMeshAgent nav; // Start is called before the first frame update void Start() { nav = GetComponent(); } // Update is called once per frame void Update() { nav.SetDestination(player.position); } }

Viewing all articles
Browse latest Browse all 536

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>