Question by
ethan-smith · Jun 16, 2019 at 10:26 AM ·
rigidbodygravityrigidbody.addforcerigidbody.velocity
revolving a rigidbody around another MOVING rigidbody
Im doing an outerspace simulation type thing. i have a rigidbody planet moving around a sun and i want a rigidbody moon to orbit the planet. the way the planet orbits is by having anything with gravity acting on it addforce the planet in their direction. two suns would pull in two different directions. if i want the moon to move with the planet and revolve around it then this would be similar to having something move by being parented but i need the rigidbody on the moon and parenting doesnt work with rigidbodies. any idea how i can calculate the force to apply to the moon to get it to follow the planet? the planet and moon have different masses.
thanks for the help.
Comment