- Home /
Question by
gagangarg631 · May 13, 2020 at 12:46 PM ·
uiunityeditor
i want to find angle bw two Vectors
i m trying to find angle bw two Vectors but unity gives me incorrect angles this is my code: Vector3 tempv = new Vector2(0,1f); Vector3 o = new Vector2(1f,0); float f = Vector2.Dot(tempv,o); f = f/(tempv.magnitude o.magnitude); f = f/Mathf.Acos(f); f = f Mathf.Rad2Deg; my expected answer is 90 but it gives me 0 can Anyone solve this problem
Comment
Your answer
Follow this Question
Related Questions
How to record the time of pressing the UI buttons, and repeat the press. 2 Answers
error CS0029: Cannot implicitly convert type 'string' to 'int'... I EVEN ADDED .ToString(); 1 Answer
How can I instantiate button like this? 2 Answers
Search child under parent in self 1 Answer
Full Screen Toggle will not work. 1 Answer