I am curious exactly how this method works, Vector2.Angle.
I know it takes in 2 parameters, bother vector2 objects, but what does it do to calculate the angle?
I used this function in my camera rotation script, for android, and used the positions of two touches to rotate camera if it got bigger or smaller. I also had a debug string output to a guiText object in my scene and got odd results.
-
When my fingers are at a 45 degree angle (diagonal and not horizontal / vertical) the angle was said to be zero. Why could this be? Could it be due to my main camera not being horizontal or vertical?
-
When my fingers are close to each other, the angle decreases. I keep them horizontal, but if i pinch in, the angle decreases, and if i pinch out, the angle increases, why is this?
-
How cam I accommodate for this odd effect and what does it mean?
-
When i take the angle of two points, does it form a triangle between the two points, or does it tell the orientation (according to being vertical or horizontal) of these two points?
-
when thinking in 3d space, what does vector2.angle tell you, if i split up rotations into up/down (one plane) and left/right (2nd plane)? I am curious because i wnat to make an object chase another and want to use angles to see if it is facing the object based on its, and target object’s position. (not using vector 3 as i don’t know how to interpret what that angle means in 3d space as i would assume it needs two components that display 2 angles)
Sorry if these questions are vague or i am asking too much, i figured it would fit under this topic as it helps in the understanding of how Vector2.Angle (and an idea of Vector3) works.