Added support for gravity in physics engine