I have calculate the distance between an object and waypoints. I have taken waypoints as transform, which is an array. The problem is:- I am not able to calculate the distance between the object and respective waypoints in the code.
Despite giving var k,l,m,.... = Vector3.Distance(waypoint[0,1,2,...].position,object.transform.position); I am not able to find the distance. If I haven’t given the waypoints in an array, the code will work. But I have to give it in an array. But how!