public class Move : MonoBehaviour
{
public NavMeshAgent[] meshAgents=new NavMeshAgent[4];
private Vector3 camFollowPos;
private string MoveState;
private float screenSpeed=20;
private float scrollSpeed = 10;
private bool bMove = true;
// Start is called before the first frame update
void Start()
{
camFollowPos=transform.position;
}
// Update is called once per frame
void Update()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if (Input.GetMouseButtonDown(1))
{
bMove = false;
if (Physics.Raycast(ray, out hit))
{
for(int index=0; index<meshAgents.Length; index++)
{