Skip to main content
gamedev.net
🔒 Locked

Real simple one

Started by happypirate Dec 29, 2004 at 1:35 AM 3 replies 750+ views
Original Post
happypirate
happypirate
ok, so im kinda confused here. say i throw a ball up in the air with an acceleration of say 15 m/s2, how long is it in the air, all the information i can find is about an initial velocity. thanks in advance - Jake ps. all i need is a formula or somethin
SiCrane
SiCrane
Depends on how long it accelerates, and what the initial velocity is. When all you know is an instantaneous acceleration value the problem is under-defined.
happypirate
happypirate
ok, thanks, that would explain why i couldn't find any info
shmoove
shmoove
But the moment you throw it in the air, the only force (well, in a simple physics question that ignores stuff like drag and the effect of wind, etc.) affecting it is gravity so where is that acceleration coming from? All you need to know is the initial velocity and solve it from there. Or am I missing something?

shmoove
sbroumley
sbroumley
The following frictionless projectile formulas may help you (these can be found in any textbook or google for projectile motion):

1) s = ( u * t ) + ( 0.5f * a * ( t * t ) )
2) v = u + ( a * t )

where

* = multiply
s = distance travelled in meters
u = initial velocity in meters per second
v = current velocity in meters per second
t = time in seconds
a = acceleration in meters per second squared


If you know the initial velocity upwards (u) and constant gravity (g) is acting downwards then the time it is in the air can be derived like so:

We know that the velocity when the object arrives at the starting position again (end of arc) is -u and acceleration is -g. Substitute into 2) gives:

-u = u + ( -g * t )

-2 * u = -g * t

which gives:

t = ( 2 * u ) / g


Hope that helps.
Steve Broumley

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.