I would like to take the Y rotation of one object and paste it into another, but I’m having a hard time understanding how Unity handles rotations. I have read the manual on Quaternions and I’m not sure how I should write my C# code.
Taking the position of one object using Vertex3 is easy enough but I’m having a hard time understanding if I have to use euler angles. I understand a single rotation axis can not be represented in euler angles since quaternions have to be represented with XYZW at all times. I don’t want to know the actual angle. I just want to copy it. I don’t care about the math that Unity does behind the scenes.
I’m essentially unsure of the exact line of code to use.