Jump to content
  • Advertisement
Sign in to follow this  
bargasteh

Attraction and repulsion

This topic is 4836 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

Hello I have a question. I am trying to simulate an attraction force, which act on so many articles, this attraction force should decrease as distance of those articles decrease. so when we run the program, particles should move fast toward the other but as the length gets smaller the force should also become smaller. this is what I am thinking to use: Rf = k/d k: is a static number d: distance but when I use this as lenght become smaller speed increases instead od decrease. what can I do ? I cant think of a good solution right now, could you please give me some ideas? cheers

Share this post


Link to post
Share on other sites
Advertisement
Oh, thanks, why did I think of this myself, I am so stupid lol :)
its about 2:40 am here so it could be because of that (lol lets blame it on something else).

Share this post


Link to post
Share on other sites
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!