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
|
|
@ -134,6 +134,19 @@ namespace RacesOfValheim
|
|||
// the colour back as much as it lowers the brightness.
|
||||
public static readonly float EyeGlowStrength = 0.5f;
|
||||
|
||||
// Applied to the model's left eye alone - the one on your right as you look at it.
|
||||
//
|
||||
// The two are placed symmetrically and do not come out symmetrical, because the face they
|
||||
// emerge through is not flat: nearer the midline the skull juts forward, nearer the temple
|
||||
// it falls away, so a ball that meets the receding side shows more of itself. With a 24mm
|
||||
// radius spanning that curve the difference is a visible few millimetres of cap. Rather
|
||||
// than shrink both and lose the socket depth, the one that comes out proud is taken down
|
||||
// on its own.
|
||||
//
|
||||
// If the wrong eye shrinks, the sideways axis resolved the other way round: apply this to
|
||||
// index 1 in PlaceEyes instead of index 0.
|
||||
public static readonly float LeftEyeSizeMultiplier = 0.85f;
|
||||
|
||||
// Base glow, before any star. The tiers replace it with the emissive colours the game
|
||||
// itself gives a starred dverger - RGBA(0, 4, 3.3) at one star and RGBA(12, 0, 8.8) at
|
||||
// two, both far past 1, which is exactly what makes them bloom rather than just look
|
||||
|
|
|
|||
|
|
@ -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