Apply gravity only at the end of the update

This way the changes to external forces made by users are not
overwritten.
Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>