I'm trying to make a few game objects (moons) orbit a planet in unity. Basically just picture a planet in the center of the screen, and a few small moons that orbit the planet with a constant velocity. I have gotten this to work nicely using transform.RotateAround(), but I wanted to take advantage of the physics engine that unity provides for realistic "bouncing" of the game objects relative to others as they collide.

I have tried a few things such as Hinge Joints, Configurable Joints, and even just adding forces to try to get it to move in a spherical manner. I can't seem to get it to work correctly though. The configurable joint is the closest that I've come, but it's a bit off and it doesn't stay orbiting. It's likely my lack of knowledge with using rigidbodies in 3d, but I figured someone out there could help get me on the right track. Thanks in advance for any help!

  • \$\begingroup\$ The way I'd see this is to give the planet a circular gravity. I abandoned Unity so I unfortunately can't point you there... Then you can look up things like orbital velocity to see how fast it has to move. \$\endgroup\$
    – John K
    Commented May 4, 2016 at 21:22


You must log in to answer this question.

Browse other questions tagged .