fix(eyes): female face placement, smaller Dvergar/Aswid eyes, grey Alfar eyes

The female body maps the painted eyes about 6 mm lower and a quarter closer
together than the male one (read from bodymale/bodyfem and the skin UVs), so
every race's male-tuned eyes sat on the female brow. PlayerFace moves them for
the Dvergar, Aswid, Sverm and Alfar.

Dvergar eyes shrink to an 18 mm radius. The Aswid's borrowed sockets are
halved before the config multiplier and the smoke is off by default.

Alfar eyes become slanted, wrapped black almonds with a wet sheen. They are
placed in fixed head-local units: the live lossyScale under the non-uniform
Alfar body drifted as the head turned, and the 0.5 s cosmetic pass made the
eyes trail the face.
This commit is contained in:
kanym 2026-10-27 15:01:44 +01:00
commit 026def2fde
8 changed files with 139 additions and 42 deletions

View file

@ -277,10 +277,16 @@ namespace RacesOfValheim
// metre was the entire drift: the offsets below are under a centimetre in local units
// and never stood a chance of mattering next to it.
float raceScale = GetVisualScale(player);
Vector3 baseLocal = localForward * (DvergarConfig.EyeForward * raceScale * toLocal)
+ localUp * (DvergarConfig.EyeHeight * raceScale * toLocal);
float eyeLocalSize = DvergarConfig.EyeSize * raceScale * toLocal;
float height = DvergarConfig.EyeHeight;
float separation = DvergarConfig.EyeSeparation;
float eyeSize = DvergarConfig.EyeSize;
PlayerFace.AdjustEyes(player, ref height, ref separation, ref eyeSize);
Vector3 baseLocal = localForward * (DvergarConfig.EyeForward * raceScale * toLocal)
+ localUp * (height * raceScale * toLocal);
float eyeLocalSize = eyeSize * raceScale * toLocal;
for (int i = 0; i < holder.childCount; i++)
{
@ -293,7 +299,7 @@ namespace RacesOfValheim
float side = i == 0 ? -1f : 1f;
float size = i == 0 ? eyeLocalSize * DvergarConfig.LeftEyeSizeMultiplier : eyeLocalSize;
eye.localPosition = baseLocal + localRight * (side * DvergarConfig.EyeSeparation * raceScale * toLocal);
eye.localPosition = baseLocal + localRight * (side * separation * raceScale * toLocal);
eye.localScale = Vector3.one * size;
}
}