more fun with vectors...whooohooo
Blitz3D Forums/Blitz3D Programming/more fun with vectors...whooohooo| 
 | ||
| Last thing about vectors, I promice.  How do I get the angle of vectorB relative to vectorA? | 
| 
 | ||
| atan2 | 
| 
 | ||
| That doesn't really answer my question.  Far as I can tell, that will give me the angle of a vector, which is great if your need angle relative to the world, but I need the angle relative to the angle of the first vector, vectorA.  Or am I missing something. | 
| 
 | ||
| Basically, subtract the angle of vectorA from the angle of vectorB. This will give the angle vectorA needs to be rotated by in order to match vectorB. There are actually 2 delta angles between vectors, though, so if you want the smallest one, you'll need to check if the delta is > 180 degrees. |