I Have a Ball Object wich is affected by Gravity ( and only Gravity ).
What i want is to find an expression wich will tell me the number of steps it takes ( how many times Gravity_ has to be applied ) before the Ball reaches the bottom of the Screen ( Y = 480 ).
FOR CONSTANT GRAVITY, THIS IS EASY
'Distance from Bottom Of Screen'/ Gravity_ = Number of steps.
Ball Ypos = 473
Gravity = 2
7/ 2 = 3,5
This example is not very complicated, and we can easily tell that this method is accurate and correct ( 473 + ( 2 * 3.5 ) = 480 ).
FOR NON CONSTANT GRAVITY, NOT SO MUCH
This is how Gravity works in my case ( im guessing its exponential? ):
- Every Frame
--> Add 1 to Gravity_
--> Ball set Ypos to Ball Ypos + Gravity_
How can i make an expression wich will let me know the number of steps it takes before the Ball reaches the bottom of the Screen ( Y = 480 ) in this case?