1 Reply

The total distance travelled by an entity is just the sum of the distances travelled each time the entity moves. For the sake of simplicity, you can compute the distance in the Update MonoBehaviour function. However, keep in mind that Vector3.Distance is "costly". If you have many entities, you should find a way to optimize the computation.