public override void generateWaypoints() { flightPath.Clear(); for (int i = 0; i < pathSize; i++) { System.Random random = GlobalRandom.getInstance().getRandom(); float x = (float)random.NextDouble() * fieldSize.x - (float)random.NextDouble() * fieldSize.x; float y = (float)random.NextDouble() * fieldSize.y - (float)random.NextDouble() * fieldSize.y; float z = (float)random.NextDouble() * fieldSize.z - (float)random.NextDouble() * fieldSize.z; FlightWaypoint waypoint = Instantiate(wayPointPrefab, new Vector3(x, y, z), Quaternion.identity); flightPath.Add(waypoint); } }
public override void generateWaypoints() { waypoint = Instantiate(wayPointPrefab, pos, Quaternion.identity); }