What two factors affect the gravitational attraction between objects?