reversed world scaling

This commit is contained in:
Snorre 2025-04-05 17:44:24 +02:00
parent f03f47df1f
commit 251110012b

View file

@ -39,7 +39,7 @@ public partial class Mouth : XRCamera3D
{
GD.Print("Ate ", mass, "kg");
MaxEatWeight += (mass / MaxEatWeight) * EatGrowthFactor;
float WorldScale = 1.0f / MaxEatWeight;
float WorldScale = MaxEatWeight;
((XROrigin3D)GetParent()).WorldScale = WorldScale;
((Node3D)GetParent()).GlobalScale(new Vector3(WorldScale, WorldScale, WorldScale));
RightHand.Strength = MaxEatWeight;
@ -47,8 +47,8 @@ public partial class Mouth : XRCamera3D
GD.Print("New MaxEatWeight: ", MaxEatWeight);
GD.Print("New WorldScale: ", WorldScale);
// Near = 0.05f * MaxEatWeight;
// Far = 4000f * MaxEatWeight;
Near = 0.05f * MaxEatWeight;
Far = 4000f * MaxEatWeight;
}
}