Added a gravity variable for entities.