hello team,
I have two vectors, the first vector is the direction of a conveyor (direction). the second vector is the orientation of a queue (orientation). I would like to rotate the queue so that its orientation is aligned with the direction of the conveyor.
to get the angle between the two vectors, I do: angle = orientation.angle(direction).
then to rotate the queue in order to align its orientation, I do : obj.setRotation(0,0,angle );
as you can see on the image above, it does not work in all scenarios. what I found is, if I do angle = direction.angle(orientation), I get the same result as angle = orientation.angle(direction). so it does not capture sign of the angle, in other words, it does not capture the information if I am in clock direction or counter clock direction.
I will appreciate a help with this.
Thanks!