[SOLVED]Trying to calculate player distance travelled

I’m trying to calculate the exact amount the player has moved around the world.



I’ve been trying an array of two vectors containing both the characters current and past location then taking the distance between them and amounting it up each time to create the distance travelled. Rewriting them as it goes.



However I guess logic is running faster than an animation/represented movement. Is there something I’m missing for this already or any suggestions to what might help?

make sure you are creating clones when you are storing the locations and not just doing getLocalTranslation() i.e

[java]Vector3f currentLocation = getLocalTranslation.clone()[/java]

Ahhh! works perfect, thank yahs!