-- what is the gravity that would allow jumping to a given height?
g = (2*jumpHeight)/(timeToApex^2)
-- what is the initial jump velocity?
initJumpVelocity = math.sqrt(2*g*jumpHeight)
-- how long does it take to reach the maximum height of a jump?
-- note: if "initJumpVelocity" is not a multiple of "g" the maximum height is reached between frames
timeToApex = initJumpVelocity/g