Rating: 4.5

### Unity Scene with a drone and trail.

------

**Video:** [https://www.youtube.com/watch?v=ipe1qHXY2dw](https://www.youtube.com/watch?v=ipe1qHXY2dw)

**Script:**

```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;

public class MovingDrone : MonoBehaviour
{

public float velocity = 10.0f;
public Vector3 direction;
public int lenCoords = 0;
public int i = 0;
public string[] lines;

// Start is called before the first frame update
void Start()
{
StreamReader reader = new StreamReader("sensors.log"); //preprocessed file
lines = reader.ReadToEnd().Split('\n');
lenCoords = lines.Length;
}

// Update is called once per frame
void Update()
{
if (i < lenCoords) {
if (lines[i].Contains(",")) {
string[] coords = lines[i].Split(',');
float x = float.Parse(coords[0]);
float y = float.Parse(coords[1]);
float z = float.Parse(coords[2]);
this.direction = new Vector3(x, y, z);
}

transform.Translate(this.direction * velocity * Time.deltaTime);
i += 1;
}
}
}
```

Original writeup (https://www.youtube.com/watch?v=ipe1qHXY2dw).