Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Newtonian Gravity working backwards

$
0
0
I'm trying to make a planet affect other objects. It kind of resembles artificial planetary gravity, but it is wierd, because the farther the object is, the more force it excerts. Perhaps there is something wrong with my formulation? Vector3 direction = rbUnderInfluence [i].transform.position - transform.position; intensity = gravitationalForce * (rb.mass * planetMass / distance * distance); rb.AddForce (direction * intensity);

Viewing all articles
Browse latest Browse all 1264


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>