So disclaimer: I never was any good at math, and had a very-poor teaching experience in the mathematics department. But I’m trying to get better. (So if anyone knows of any good resources for getting up to speed on game-relevant math, I’d be happy to know of it)
So I’m working on making the editor a lot more fluent and easier to use with some custom systems, and the one I’m currently working on using Blueprints is a Pipe Creator, you plop the thing down and drag spline nodes around and it automatically creates pieces, elbows, and angles things for you and follows the spline path.
Currently what I’m trying to do is get the angle between two spline points so I can determine what sort of elbow mesh to create, be it a 30/45/60/90. So I googled my way through it, and found this (https://answers.unrealengine.com/questions/31058/how-to-get-an-angle-between-2-vectors.html)
However, my results are confusing me.
The first one is equaling zero because 0 - 1 = -1 and there is no -1 index. Got that. But as I drag my point straight out the “angle” keeps increasing. If both Vectors are facing the same way (which they should be because the tangent’s are both the same) and 2 out of the 3 axis’s are completely the same. Shouldn’t the angle be 0? We’re a straight line after all.