Archived

This topic is now archived and is closed to further replies.

DirectXXX

Gravity Area

Recommended Posts

i know how to simulate gravity. but how to make it decay as the objects gets far away from the planet(gravity source).

Share this post


Link to post
Share on other sites
Do you know about vectors? The formula for gravity is

F = k * m1 * m2 / r²

And it is oriented in the direction of the vector between the object and the planet.

Cédric

Share this post


Link to post
Share on other sites
No offense, but what exactly about gravity do you know how to simulate if you don''t know how to make the force decrease with distance? Aside from knowing how to use acceleration vectors, all there is to it is the formula F=Gmm/r^2. If you explain exactly what you do know, I''d be glad to explain what you don''t.

Share this post


Link to post
Share on other sites