Merge pull request #1324 from notargs/feature/fastspringbone_bugfix

Normalize quaternion on update headTransform.rotation
This commit is contained in:
ousttrue
2021-10-19 18:17:33 +09:00
committed by GitHub

View File

@@ -106,7 +106,7 @@ namespace UniVRM10.FastSpringBones.System
if (parentTransform.HasValue)
{
var parentLocalToWorldMatrix = parentTransform.Value.localToWorldMatrix;
headTransform.localRotation = Quaternion.Inverse(parentTransform.Value.rotation) * headTransform.rotation;
headTransform.localRotation = (Quaternion.Inverse(parentTransform.Value.rotation) * headTransform.rotation).normalized;
headTransform.localToWorldMatrix =
parentLocalToWorldMatrix *
Matrix4x4.TRS(