Jump to content
  • Advertisement
Sign in to follow this  

I finally (think) I figured out what is wrong with my planet gravity sim

This topic is 4735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been doing a simulation of the effects of inter-planetary gravity. The problem, I believe, doesn't lie with my algorithm (modeling the whole F=GMm/d^2 thing). Instead (there is no clipping), the planets, esp. when there are only two, get so close together that their distance is a tiny fraction of 1. Therefore, squared, it is even tinier, leading to them all of a sudden getting a sudden burst of speed, since it obviously isn't modeled in "perfect realtime", if you know what I mean. All of a sudden, their force jumps up astronomically, and they zoom away from each other, although in the direction they needed to move to get closer together - they overshoot. Any ideas on how to counteract this? This is supposed to be a realistic simulation (its for a physics project). But the main thing is that it looks realistic, which it certainly doesn't at this time. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!