style(dvergar): shrink the model's left eye on its own
The pair is placed symmetrically and does not come out symmetrical, because the face is not flat: near the midline the skull juts forward, near the temple it falls away, and a 24mm ball spanning that curve shows more of itself on the receding side. Rather than shrink both and give back the socket depth just gained, the eye that comes out proud is taken to 0.85 on its own. If the wrong one shrinks, the sideways axis resolved the other way round and the multiplier belongs on the other index - which is written down where it is applied.
This commit is contained in:
parent
e6bf266eea
commit
ef8fae888a
2 changed files with 20 additions and 1 deletions
|
|
@ -273,10 +273,16 @@ namespace RacesOfValheim
|
|||
for (int i = 0; i < holder.childCount; i++)
|
||||
{
|
||||
Transform eye = holder.GetChild(i);
|
||||
|
||||
// Index 0 is offset against the right axis, so it is the model's left eye - the
|
||||
// one on your right as you face it. It gets its own size, because the face is
|
||||
// curved and the two sides do not present the same surface to a ball of this
|
||||
// radius.
|
||||
float side = i == 0 ? -1f : 1f;
|
||||
float size = i == 0 ? eyeLocalSize * DvergarConfig.LeftEyeSizeMultiplier : eyeLocalSize;
|
||||
|
||||
eye.localPosition = baseLocal + localRight * (side * DvergarConfig.EyeSeparation * raceScale * toLocal);
|
||||
eye.localScale = Vector3.one * eyeLocalSize;
|
||||
eye.localScale = Vector3.one * size;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue