So I made a program with flash where you click anywhere on the screen and it sends two balls with the same initial velocity in the y-direction that should cross right through the point of the mouse, one doing so at the top of its arc and another flying up and coming down onto it. Basically it's a program for trajectory.
Now if you open it up and test it (and click really really rapidly) you'll notice the location where the balls cross paths (which should be on the tip of the mouse) is up a little further up and a little to the right. I could easily calibrate this by multiplying the xspeed by some variable (i.e.- 0.97 or something), but I was just wondering if anyone could tell me what is wrong with what I have.
I did the equation used in the program out on paper using the base equation "d=tV0 + (1/2)at^2" (displacement= (time*initial velocity)+ 1/2 of (acceleration*(time squared)).
Then I made it find the xspeed required for the ball to cross through the mouse point with a given yspeed. The reason for the two balls are because of two answers to the equation calculating the xspeed. This is because of a square root having a "+ or -" sign in front of it such as the one in the quadratic formula, as my equation is based on both the displacement physics equation and the quadratic formula.
What is funny is that I figured that if something did go wrong based on human error that the mistake, given that I'm using a large complex equation, would cause drastic malfunction, but it's almost right on the mark.
If you download the file try lowering the magnitude of the gravity and you will notice it becomes more accurate, but when set to -5 it's way off
Anyone know why it's a little off?
p.s.- don't be afraid to reply, even if you can't help me, I just want to know people are listening