Skip to content

Commit

Permalink
Merge pull request #320 from Santarh/resetSpringBoneRotation
Browse files Browse the repository at this point in the history
Add a method to reset bones under the influence of SpringBone.
  • Loading branch information
hiroj authored Sep 27, 2019
2 parents 37955f3 + 50304b0 commit 291dea0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/VRM/UniVRM/Scripts/SpringBone/VRMSpringBone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ public void Setup(bool force=false)
}
}

public void SetLocalRotationsIdentity()
{
foreach (var verlet in m_verlet)
{
verlet.Head.localRotation = Quaternion.identity;
}
}

static IEnumerable<Transform> GetChildren(Transform parent)
{
for(int i=0; i<parent.childCount; ++i)
Expand Down

0 comments on commit 291dea0

Please sign in to comment.