mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-09 04:19:42 -05:00
remove unused
This commit is contained in:
@@ -54,6 +54,18 @@ namespace UniVRM10
|
||||
_initialTargetGlobalRotation = controlTarget.rotation;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 親から再帰的にNormalized の ローカル回転を初期回転を加味して Target に適用する。
|
||||
/// </summary>
|
||||
internal void ProcessRecursively()
|
||||
{
|
||||
ControlTarget.localRotation = _initialTargetLocalRotation * Quaternion.Inverse(_initialTargetGlobalRotation) * ControlBone.localRotation * _initialTargetGlobalRotation;
|
||||
foreach (var child in _children)
|
||||
{
|
||||
child.ProcessRecursively();
|
||||
}
|
||||
}
|
||||
|
||||
public static Vrm10ControlBone Build(UniHumanoid.Humanoid humanoid, Dictionary<HumanBodyBones, Vrm10ControlBone> boneMap)
|
||||
{
|
||||
var hips = new Vrm10ControlBone(humanoid.Hips, HumanBodyBones.Hips);
|
||||
@@ -71,12 +83,6 @@ namespace UniVRM10
|
||||
{
|
||||
if (humanoid.TryGetBoneForTransform(current, out var bone))
|
||||
{
|
||||
|
||||
// ヒューマンボーンだけを対象にするので、
|
||||
// parent が current の直接の親でない場合がある。
|
||||
// ワールド回転 parent^-1 * current からローカル回転を算出する。
|
||||
var parentInverse = Quaternion.Inverse(parent.ControlTarget.rotation);
|
||||
|
||||
var newBone = new Vrm10ControlBone(current, bone);
|
||||
newBone.ControlBone.SetParent(parent.ControlBone, true);
|
||||
parent._children.Add(newBone);
|
||||
@@ -89,17 +95,5 @@ namespace UniVRM10
|
||||
BuildRecursively(humanoid, child, parent, boneMap);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 親から再帰的にNormalized の ローカル回転を初期回転を加味して Target に適用する。
|
||||
/// </summary>
|
||||
internal void ProcessRecursively()
|
||||
{
|
||||
ControlTarget.localRotation = _initialTargetLocalRotation * Quaternion.Inverse(_initialTargetGlobalRotation) * ControlBone.localRotation * _initialTargetGlobalRotation;
|
||||
foreach (var child in _children)
|
||||
{
|
||||
child.ProcessRecursively();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user