Answers for "How can I calculate the Vector3 b using Vector 3 a pos with an angle?"
http://answers.unity.com/questions/1350493/how-can-i-calculate-the-vector3-b-using-vector-3-a.html
The latest answers for the question "How can I calculate the Vector3 b using Vector 3 a pos with an angle?"Answer by JVene
http://answers.unity.com/answers/1529254/view.html
@JamesEvanNeal, a lot depends on the nature of 3D orientation, which is to say if you have a rotation to apply that isn't aligned on an axis.
In the example code you've given the angle assumes the rotation is on the Z axis (producing new x and y coordinates). In that case NA is 0, because when the rotation as aligned to the Z axis this way, z will not change.
Also, length is assumed to be on the X axis before the rotation. That's implied by your particular use of the rotation formula (the y portion of the classical rotation has been omitted because y is zero).
If the rotation isn't aligned on an axis, you'd probably express that as a Quaternion. The Quaternion could be created from Euler angles with
Quaternion q = Quaternion.Euler( x, y, z );
where each x, y and z parameter is an angle of rotation in degrees for each axis. This results in what is visually a rotation that may not be aligned to an axis.
To use q, a Quaternion, similarly to your 2D example, you could:
Vector3 va = new Vector3( 2, 0, 0 );
Vector3 vr = ( q * va ) + startLimbA;
The equivalent to your example, where NA is zero because this is a rotation on the Z axis is:
Vector3 va = new Vector3( 2, 0, 0 );
Quaternion q = Quaternion.Euler( 0, 0, 45 );
Vector3 startLimbA = new Vector3( 0, 1, 0 );
Vector3 vr = ( q * va ) + startLimbA;Sat, 14 Jul 2018 18:38:04 GMTJVene