I'm a game developer, and I've been struggling with a kinematics problem in the development process of my current project.
I have some stationary objects that are suddenly affected by gravity after a period of time. Now, after say 2 seconds, I want those objects to 'cancel' their free falling, and return to their starting positions. Currently, I do this by inversing their downward velocity as soon as I want them to move up again. However, they never quite reach their starting position, since they are still affected by that gravitational force. How do I 'reverse calculate' this gravitational force, so that the upward velocity is big enough to move the objects back up at their starting positions while still being affected by gravity? Note that drag doesn't come into play, it's just the gravitational acceleration of $-9.81m/s^2$.