Mesh creation

I’ve been learning how to create meshes recently with a script, and am still very new to the hole concept, but im wondering if theres a way to get the direction from an origin point to a specific vertex, then assign a length along that direction, so a cube would eventually become a sphere, if that cube has enough vertices.

thanks Chris

This illustrates how to get a direction vector from two points:
http://mathonline.wikidot.com/determining-a-vector-given-two-points

If you want to find a point that is a certain distance in a direction, just normalize your direction vector and multiply it by the distance. Vector3 has a built-in method to normalize a vector.

thanks so much, that page has helped a load.