Old content explained a different thing
commited
commit
4115513084c447d6c56b5a1c937fa96fe39bf4fc
... | ... | @@ -1,4 +1,12 @@ |
1 | You can get an angle between two [[vector]]s using this method: |
|
1 | 2 | |
2 | Vector2 - vector1 into look rotation |
|
3 | 1. Calculate [[cross product]] of the vectors |
|
4 | 2. Get [[look rotation]] of both vectors with Up equal to the cross product |
|
5 | 3. [["Subtruct" these rotations|How to subtract rotations?]] |
|
6 | 4. Get Y component of the resulting rotation (X and Z will equal to 0) |
|
3 | 7 | |
4 | [[/uploads/Screenshot_20191230_141533_com.martinmagni.fancade.png]] |
|
... | ... | \ No newline at end of file |
0 | *Note:* when you calculate the cross product and "subtract" the rotations, the arguments should be passed in the same order. Otherwise, the angle will be a negative number. |
|
1 | ||
2 | Script example: |
|
3 | ||
4 | [[uploads/angle_between_vectors.jpg]] |
|
... | ... | \ No newline at end of file |