private void Update() { if (Input.GetMouseButtonDown(0)) { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit, 1000)) { NPC.NewPath(GetPath(NPC.transform.position, hit.point)); } } }
public void NewPath(Path newPath) { pathFollower.NewPath(newPath); }