What value does my_height have? If it's bigger than zero, then the marked line will quite obviously always return -my_height, which may or may not be something you want.
It probably isn't. Check the signs

Also, what framerate are we talking here? If we use vars, I wouldn't be too shocked if their inaccuracies add up fast here with small values (which time_step tends to have if your FPS goes beyond the insane)