HistoryCache - ManeFunction/ManeTools-Unity GitHub Wiki
Vector2HistoryCache and Vector3HistoryCache extend HistoryCache<T> from ManeTools-dotNET. GetAverage() is the vector mean. Empty → zero. Overlapping Append, Clear, and GetAverage calls on one cache are serialized by the base class.
Vector3HistoryCache trail = new(30);
trail.Append(transform.position);
Vector3 smooth = trail.GetAverage();