diff --git a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs index f684739ae..482bb6154 100644 --- a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs +++ b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialExporter.cs @@ -152,7 +152,11 @@ namespace UniVRM10 const float invertY = -1f; mtoon.UvAnimationScrollYSpeedFactor = context.UvAnimationScrollYSpeedFactor * invertY; } - mtoon.UvAnimationRotationSpeedFactor = context.UvAnimationRotationSpeedFactor; + // Speed unit Conversion + const float rotationPerSecToRadianPerSec = Mathf.PI * 2f; + // Coords conversion + const float unityToGltfCoordsConversion = -1f; + mtoon.UvAnimationRotationSpeedFactor = context.UvAnimationRotationSpeedFactor * rotationPerSecToRadianPerSec * unityToGltfCoordsConversion; // Texture Transforms var scale = context.TextureScale; diff --git a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialImporter.cs b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialImporter.cs index c0a5420a1..aa2ccb4a8 100644 --- a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialImporter.cs +++ b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialImporter.cs @@ -224,7 +224,11 @@ namespace UniVRM10 var uvAnimSpeedRotation = mToon?.UvAnimationRotationSpeedFactor; if (uvAnimSpeedRotation.HasValue) { - yield return (MToon10Prop.UvAnimationRotationSpeedFactor.ToUnityShaderLabName(), uvAnimSpeedRotation.Value); + // Speed unit Conversion + const float radianPerSecToRotationPerSec = 1f / (Mathf.PI * 2f); + // Coords conversion + const float gltfToUnityCoordsConversion = -1f; + yield return (MToon10Prop.UvAnimationRotationSpeedFactor.ToUnityShaderLabName(), uvAnimSpeedRotation.Value * radianPerSecToRotationPerSec * gltfToUnityCoordsConversion); } // UI