if (falling == true) {
panel.pos_y = fallheight + (0 * falltime) + 0.5 * 9.98 * (falltime*falltime); //gravity formula, change (0 * falltime) for giving an initial speed
falltime += time_step; //falltime is counting
}
if (falling == false) {
falltime = 0; //reset falltime
fallheight = panel.pos_y; //record height as long as we're on ground, can then be used as initial height when in the air
}