Yes, all four factors mentioned play a role in preventing the planets in our solar system from floating away. Earth's gravitational pull keeps the Moon in orbit around us, while the Moon's gravitational pull keeps the Earth in orbit as well. Similarly, the Sun's gravitational pull keeps all the planets, including Earth, in orbit around it. Additionally, the planets also exert a gravitational pull on each other, helping to stabilize their orbits within the solar system.