I think you need to consider X and Y distance separately. Also SpeedY. So you'll need 3D array there. Is that how you do it? Cool! Keep up the good work!