feat(eyes): per-eye sliders, Aswid female defaults from playtest
Each Eyes Position section now has a set per body and per eye (the character's own left and right), because the face is not symmetric enough for one set to fit both eyes. The Aswid female defaults are the per-eye values dialled in on screen; Alfar and Dvergar copy their female values to both eyes. The old shared keys are dropped: they only ever existed in test builds.
This commit is contained in:
parent
ffba40650e
commit
132d7e034f
5 changed files with 124 additions and 100 deletions
|
|
@ -320,16 +320,6 @@ namespace RacesOfValheim
|
|||
|
||||
float scale = GetPlayerScale(player) * toLocal;
|
||||
|
||||
// The per-body sliders of "Eyes Position - Aswid", on top of the race's own offsets.
|
||||
EyePositionConfig.Tuning tuning = EyePositionConfig.For("Aswid", player);
|
||||
float forward = AswidConfig.EyeForwardOffset.Value + (tuning != null ? tuning.Forward.Value : 0f);
|
||||
float height = AswidConfig.EyeHeightOffset.Value + (tuning != null ? tuning.Height.Value : 0f);
|
||||
float separation = AswidConfig.EyeSeparationOffset.Value + (tuning != null ? tuning.Separation.Value : 0f);
|
||||
float size = AswidConfig.EyeSizeMultiplier.Value * (tuning != null ? tuning.Size.Value : 1f);
|
||||
|
||||
Vector3 shift = frame.LocalForward * (forward * scale)
|
||||
+ frame.LocalUp * (height * scale);
|
||||
|
||||
for (int i = 0; i < holder.childCount; i++)
|
||||
{
|
||||
Transform eye = holder.GetChild(i);
|
||||
|
|
@ -342,6 +332,16 @@ namespace RacesOfValheim
|
|||
float side = Mathf.Sign(Vector3.Dot(authored.Position, frame.LocalRight));
|
||||
if (side == 0f) side = i == 0 ? -1f : 1f;
|
||||
|
||||
// This eye's sliders from "Eyes Position - Aswid", on top of the race's own offsets.
|
||||
EyePositionConfig.Tuning tuning = EyePositionConfig.For("Aswid", player, side);
|
||||
float forward = AswidConfig.EyeForwardOffset.Value + (tuning != null ? tuning.Forward.Value : 0f);
|
||||
float height = AswidConfig.EyeHeightOffset.Value + (tuning != null ? tuning.Height.Value : 0f);
|
||||
float separation = AswidConfig.EyeSeparationOffset.Value + (tuning != null ? tuning.Separation.Value : 0f);
|
||||
float size = AswidConfig.EyeSizeMultiplier.Value * (tuning != null ? tuning.Size.Value : 1f);
|
||||
|
||||
Vector3 shift = frame.LocalForward * (forward * scale)
|
||||
+ frame.LocalUp * (height * scale);
|
||||
|
||||
// YAW IS MIRRORED, the other two are not. Turning both eyes the same way on Y
|
||||
// makes the pair look sideways - both point off the same shoulder, because a face
|
||||
// is symmetric about its centre line and yaw is the axis that crosses it. Negating
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue