Move object from point A to point B on a sphere, while staying on the surface

I need a way to move a specific object from an unknown point A on the sphere (where the object already is) to point B on the sphere (decided per each movement) (and also it’s not instant movement, it has speed), I already have a way to do this in mind but I have no idea how to implement it in C#, so the way is basically since we know the length between point A and point B we can decide the highest point in the curve, and by that we could add to another axis per each move which will make it eventually curve then we reverse it back to un-curve7182661--861397--unknown.png

There are some built-in functions in Unity for moving on the surface of a sphere, assuming you have the positions in cartesian coordinates relative to the center of the sphere:

1 Like

Ah thanks for the quick response, I’ll look into them right now

Can you provide an example of how to use them in a script together?

You wouldn’t use them together, you would use one or the other.

Vector3 currentPosition;
Vector3 targetPosition;
float speedInRadiansPerSecond;

void Update() {
  currentPosition = Vector3.RotateTowards(currentPosition, targetPosition, speedInRadiansPerSecond * Time.deltaTime, 0f);
}

Oh I see, is there a way to keep the bottom on the surface? as if feet for an example