I used Pythagoras theorem to make an equal speed across the track. look inside the code to find explanations, sorry for grammar errors.