I'm trying to make a game in Unity where the player character is a ball (a sphere), and the game world is a planet (a very large sphere) that the ball can roll around on. The ball can be rolled in any direction, via the arrow keys. If the player holds the right arrow, the ball should roll smoothly to the right, all the way around the planet not leaving the ground, until it eventually reaches back to where it started. The camera follows the ball third person such that the ball always appears in the same position in the screen and the planet appears to be moving underneath it.

My question is, how can I use rigidbody.AddForce() to roll the ball in the way described above? What I think I need to do is to take the vector I get from taking the input values on the horizontal and vertical axes:

float moveX = Input.GetAxis ("Horizontal");
float moveY = Input.GetAxis ("Vertical");

Vector3 inputMovement = new Vector3 (moveX, 0.0f, moveY);


And rotate it somehow, so that I'm applying that vector as force to the ball but in the direction that's tangential to the point on the planet that the ball is currently on, and then apply it as force to the ball's rigidbody. So if you're looking at the planet head on, and the ball is at 3 o'clock, pressing the right arrow key should apply the force directly downwards.

Can anyone help me out here? I think it's probably really simple but I'm having trouble figuring it out exactly.


Question: Is there a list of Mitzvot and their corresponding body parts?
Answer: The classic Sefer Chareidim by R' Elazar Azikri (d.1600) catalogs all the mitzvos according to body parts. (R' Elazar Azikri was also the author of the poem, Yedid Nefesh.) An abbreviated version, Kitzur Sefer Chareidim, was written by R' Avraham Danzig, author of the Chayei Adam. The sefer does not attempt to establish a precise one-for-one match for each limb and sinew. It lists the limbs only in a very broad sense, eyes, arms, legs, and so on, and then lists the various mitzvos (Biblical and Rabbinic) that are performed with that part of the body.

Sefer Chareidim happens to be one of my favorite seforim. I can't recommend it highly enough.