Loop object animation along spline in blueprint

Hello !
I imagine that i have to reset the Variable “Dist” (distance) when the object is in the last spline Point but i don’t now how can i do that ?

Here is the blueprint:

Thanks a lot

Hi !

You can use the “Get Spline Length” Node to get your spline size and set it to a float MaxDistance variable.
Finally, check if CurrentDistance >= MaxDistance, and do what you want to do :slight_smile:

//French version

Salut, content de voir un français sur le forum :slight_smile:
Il te suffit d’utiliser l’étiquette “Get Spline Lenght” pour connaitre la taille de ta spline, et tu set la variable dans un float MaxDistance.
Après tu as plus qu’à vérifier si ta distance actuelle >= MaxDistance, et après tu n’as plus qu’a faire ce que tu veux.

I hope this help you ! / J’espère t’avoir aidé :slight_smile:

Ok thanks you it works !

Ok super merci pour ton aide ça fonctionne ! :slight_smile:

Bonne soirée !