Added waypoints code for animations
fixed