diff --git a/JotunnModStub/Dvergar/DvergarVisuals.cs b/JotunnModStub/Dvergar/DvergarVisuals.cs index 8866589..50c2344 100644 --- a/JotunnModStub/Dvergar/DvergarVisuals.cs +++ b/JotunnModStub/Dvergar/DvergarVisuals.cs @@ -318,7 +318,13 @@ namespace RacesOfValheim EyeFrame frame = holder.AddComponent(); frame.LocalForward = SnapToAxis(headBone.InverseTransformDirection(root.forward)); frame.LocalUp = SnapToAxis(headBone.InverseTransformDirection(root.up)); - frame.LocalRight = SnapToAxis(headBone.InverseTransformDirection(root.right)); + + // Right is derived, never snapped. Rounding all three independently guarantees + // nothing about the angles between them, and a "right" that shares an axis with + // forward stops being sideways: the separation then pushes one eye out of the face + // and pulls the other into it, which is one eye sitting proud of a forehead while its + // twin sits correctly. A cross product cannot be anything but perpendicular. + frame.LocalRight = Vector3.Cross(frame.LocalUp, frame.LocalForward).normalized; for (int i = 0; i < 2; i++) {