refactor(eyes): bake the tuned eye corrections in, drop the sliders
The Eyes Position sections were a tuning tool. Their per-body, per-eye values from playtest now live in RaceEyeTuning as constants, so every player gets the tuned faces and Configuration Manager loses four sections. The Aswid - Eyes section stays for now.
This commit is contained in:
parent
f7a4494b39
commit
5b3b2ac88d
8 changed files with 89 additions and 169 deletions
|
|
@ -332,12 +332,12 @@ 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);
|
||||
// This eye's hand corrections (RaceEyeTuning), on top of the race's own offsets.
|
||||
RaceEyeTuning.Eye tuning = RaceEyeTuning.For("Aswid", player, side);
|
||||
float forward = AswidConfig.EyeForwardOffset.Value + (tuning != null ? tuning.Forward : 0f);
|
||||
float height = AswidConfig.EyeHeightOffset.Value + (tuning != null ? tuning.Height : 0f);
|
||||
float separation = AswidConfig.EyeSeparationOffset.Value + (tuning != null ? tuning.Separation : 0f);
|
||||
float size = AswidConfig.EyeSizeMultiplier.Value * (tuning != null ? tuning.Size : 1f);
|
||||
|
||||
Vector3 shift = frame.LocalForward * (forward * scale)
|
||||
+ frame.LocalUp * (height * scale);
|
||||
|
|
@ -359,7 +359,7 @@ namespace RacesOfValheim
|
|||
AswidConfig.EyeRotationY.Value * side,
|
||||
AswidConfig.EyeRotationZ.Value);
|
||||
|
||||
// The Eyes Position sliders turn the eye on the FACE's axes instead: conjugated by
|
||||
// The RaceEyeTuning corrections turn the eye on the FACE's axes instead: conjugated by
|
||||
// the face frame, X tips it, Y turns it toward the temple and Z raises the outer
|
||||
// corner, the same on both eyes. Added to the bone-axis twist above, X rolled the
|
||||
// eyes and a mirrored Z tipped one up and the other down.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue