Returns a scaled vector of length len, collinear with vec. Does not modify vec.
Use setLength when you need to set the length of a given vector. For example, you might want to change the length of a given bone, which can be thought of as vector from one bone joint to another.
The length of the vector is the square root of the sum of the squares of each vector component.
Useful for setting the lengths of the bones in a skeleton based on performer dimensions.
Note that the input vector vector is not modified.
setLength vector length
|Vector that points in the desired direction
|Float value of vector length or magnitude
Returns a variable of type vector which points in the same direction as vec, but is of length len.
// Declare a vector, then changes its length
// The command will return a vector value of: <>
vector $v1 = <<1, 1, 0>>, $v1 = `setLength $v1 1.0`;
print( $v1 );