If i have a point (x,y,z) how to project it on to a sphere(x0,y0,z0,radius) (on its surface). My input will be the coordinates of point and sphere. The output should be the coordinates of the projected point on sphere.

I found an answer!

```
public Vector3 ProjectOnSphere(Vector3 OriginalPosition, Vector3 SpherePosition, float radius)
{
Vector3 p = OriginalPosition - SpherePosition;
float pLenght = Mathf.Sqrt(p.x * p.x + p.y * p.y + p.z * p.z);
Vector3 q = (radius / Mathf.Abs(pLenght)) * p;
Vector3 pointOnSphere = q + cameraPosition;
return pointOnSphere;
}
```