Root motion velocity when looping causing jerkiness

Godot Version

4.4 OSX

Question

When calculating velocity from root motion on a looping animation such as a run cycle, it causes a jerkiness when the animation loops, since when it hits frame zero again, the change in root position hits zero. You can see in this video below, anyone know a solution.

Resolved:
Last Frame of the animation from Mixamo the Root bone was the same location as the previous frame instead of it moving forward, adjusted it’s distance based on the previous 2 frames difference and it now moves smoothly.