Jump from sphere vertically,Vertically jump from sphere

Hello!
I’m noob.
How can i jump sphere(little sphere) from big sphere 100% VERTICALLY like on image(Green arrow).
Sphere rotare and little sphere rotate arround.
Thanks!

Good day.

First, you must know the position of the SmallBall relative to BigBall (need the direction). Use Normalize to get a vector of magnitude 1

Vector3 Direction = Vector3.Normalize(SmallBall.position - BigBall.position);

Once you have the direction, you will need the inverse direction to “fall down” again, so…

Vector3 InverseDirection = Direction *(-1);

Now, you simply translate the object in the direction, and then move it again to inverse direction.
You can use a speed variable to move faster/slower, and even change this speed variable over time to simulate acceleration.

If helped, accept the answer and close the question!
Bye!