Stop sprite animation based end point Path2d>PathFollow2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bijju

Stop sprite animation based end point Path2d>PathFollow2D
How can i detect my sprite reached the destined Path2D (not a loop, it has an end point). once my sprite reachs the destination point i need to stop my sprite animation.How can i detect if my sprite reached the last/destination point?

Thanks
B

:bust_in_silhouette: Reply From: timoschwarzer

If you animate your PathFollow2D’s offset with an AnimationPlayer, you can set the AnimatedSprite’s playing property to false at the end of your animation. Otherwise, you could check for the PathFollow2D’s unit_offset being 1.0 in _process and then stopping the animation manually.