Change default cloud rotation speed (#266)

It should be 0 like giant's deep
This commit is contained in:
Nick 2022-08-14 17:55:01 -04:00 committed by GitHub
commit c66f4a470e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 9 deletions

View File

@ -210,11 +210,14 @@ namespace NewHorizons.Builder.Atmosphere
cloudsTopGO.layer = LayerMask.NameToLayer("IgnoreSun"); cloudsTopGO.layer = LayerMask.NameToLayer("IgnoreSun");
} }
RotateTransform topRT = cloudsTopGO.AddComponent<RotateTransform>(); if (atmo.clouds.rotationSpeed != 0f)
// Idk why but the axis is weird {
topRT._localAxis = atmo.clouds.cloudsPrefab == CloudPrefabType.Basic ? Vector3.forward : Vector3.up; RotateTransform topRT = cloudsTopGO.AddComponent<RotateTransform>();
topRT._degreesPerSecond = atmo.clouds.rotationSpeed; // Idk why but the axis is weird
topRT._randomizeRotationRate = false; topRT._localAxis = atmo.clouds.cloudsPrefab == CloudPrefabType.Basic ? Vector3.forward : Vector3.up;
topRT._degreesPerSecond = atmo.clouds.rotationSpeed;
topRT._randomizeRotationRate = false;
}
cloudsTopGO.transform.localPosition = Vector3.zero; cloudsTopGO.transform.localPosition = Vector3.zero;

View File

@ -165,9 +165,9 @@ namespace NewHorizons.External.Modules
public bool unlit; public bool unlit;
/// <summary> /// <summary>
/// How fast the clouds will rotate in degrees per second. /// How fast the clouds will rotate relative to the planet in degrees per second.
/// </summary> /// </summary>
[DefaultValue(10f)] public float rotationSpeed = 10f; [DefaultValue(0f)] public float rotationSpeed = 0f;
#region Obsolete #region Obsolete

View File

@ -364,9 +364,9 @@
}, },
"rotationSpeed": { "rotationSpeed": {
"type": "number", "type": "number",
"description": "How fast the clouds will rotate in degrees per second.", "description": "How fast the clouds will rotate relative to the planet in degrees per second.",
"format": "float", "format": "float",
"default": 10.0 "default": 0.0
} }
} }
}, },