Friday, October 10, 2014

Fish jump calculations and fly speeds

Fixed some problems with fish jump calculations. First of all, out time calculation was off. We switched to the time calculation described on this site: http://www.wired.com/2008/12/what-angle-should-you-throw-a-football-for-maximum-range/
Secondly, we were using the wrong velocity when calculating the fish Y max value. We were using only the y component of our initial velocity vector when the formula says to use the whole velocity vector. These two changes made the jump calculation much more precise.
After that I focused on making sure the fly reaches the frog at the same time as the fish does. Since the fly is supposed to be reset just as the three objects collide, it is reset before the fish is, which leads to the fly getting more and more offset each reset. 

 
Fish jump calculations