mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-07 19:38:13 -05:00
Fix uv animation speed unit of vrm-1.0
This commit is contained in:
@@ -152,7 +152,9 @@ namespace UniVRM10
|
||||
const float invertY = -1f;
|
||||
mtoon.UvAnimationScrollYSpeedFactor = context.UvAnimationScrollYSpeedFactor * invertY;
|
||||
}
|
||||
mtoon.UvAnimationRotationSpeedFactor = context.UvAnimationRotationSpeedFactor;
|
||||
// Speed unit Conversion
|
||||
const float rotationPerSecToRadianPerSec = Mathf.PI * 2f;
|
||||
mtoon.UvAnimationRotationSpeedFactor = context.UvAnimationRotationSpeedFactor * rotationPerSecToRadianPerSec;
|
||||
|
||||
// Texture Transforms
|
||||
var scale = context.TextureScale;
|
||||
|
||||
@@ -224,7 +224,9 @@ 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);
|
||||
yield return (MToon10Prop.UvAnimationRotationSpeedFactor.ToUnityShaderLabName(), uvAnimSpeedRotation.Value * radianPerSecToRotationPerSec);
|
||||
}
|
||||
|
||||
// UI
|
||||
|
||||
Reference in New Issue
Block a user