Does Unity have functions for decomposing a vector into two vectors?
Given Vector A, and Vector B(an identity with magnitude 1) I want to find the component of vector A in the direction of B.
Essentially what is shown here except in 3 dimensions:
Does Unity have functions for decomposing a vector into two vectors?
Given Vector A, and Vector B(an identity with magnitude 1) I want to find the component of vector A in the direction of B.
Essentially what is shown here except in 3 dimensions:
That’s basic vector arithmetic notions. The web is full of resources about this.
Unity has implemented the following function to find what you want : Vector3.Project