Simulating Circular Motion

I've recently been getting my teeth stuck into Box2D and have been greatly enjoying the experience so far.

I've been recently working on a project in which player can control a body. The body that he player controls is meant to move around another body at the center of the screen. If the player presses left or right the outer body will move in a circular fashion around the object in the center. If the player moves up or down then the outer body will move closer or further away from the center. The player can also move in a combination of the both the left/right and up/down. The inner body will also always be stationary.

I was hoping to get a few suggestions about the best way to do this in Box2D.

Currently I have two schools of thought.

The first is to apply a force when the player requests to move the outer body. This force will be along a tangent to the circular path that it can take. After this force is applied I'd then apply a force each time I step to make it move in a circular motion. (F=mv^2/r) where F is applied towards the center of the circle.

The second is to use joins. I'd have a distance joint between the center body and the outer body. Then when requested to move left the inner body would rotate on the spot. The problem with this approach is when I want to move outwards I can't because the only suitable join seems to be a fixed distance joint.

I'm looking for an approach that would be efficient to implement. Unfortunately my Physics skills are a bit rusty.

Any help or suggestions would be greatly appreciated.
What do you expect to happen when something collides with it:

1) "Nothing, that won't happen in my game" - if you don't care about this case, you might as well just manually control the position to get accurate circular motion.

2) "Physically accurate movement" (i.e. it will move in a straight line) - use forces.

3) "It bounces off in some way, but is still moving circularly " - use joints.

You can chain joints together using intermediate invisible bodies. In your case, pin a body at the center to the ground with a revolute joint, and a prismatic from that body to the real one. Two joints = two motors = two controllable degrees of freedome. In general, I wouldn't recommend this, as joint chains are bad for the solver, but it sounds good for you.
Thanks for your suggestions Boris. Greatly appreciated. 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=4823