Rotation Perpendicular to Line Segment
How can I find a Vector3 rotation which is perpendicular to the line segment created by connecting two other Vector3's. These two Vector3's will be coplanar with a y position of zero. I searched google, and I can't find any results that I know how to apply to my situation. Thank you!
Answer by calebamckinney · Jan 19, 2018 at 02:55 AM
Solved it! Here's the solution for the curious.
public Vector3 FindPerpendicularAngle(Vector3 pos1, Vector3 pos2) { var temp = Quaternion.LookRotation(pos2 - pos1).eulerAngles; return new Vector3(temp.x, temp.y + 90f, temp.z); '
Your answer
Follow this Question
Related Questions
Grabbing the Relative eulerAngles.y of a Rotation 1 Answer
Using quaternions to align game objects. 1 Answer
Rotating 3d person character 0 Answers
Look Rotation Viewing Vector is Zero 0 Answers