handling merge

This commit is contained in:
左右看
2023-06-29 17:12:41 +08:00
parent 7f4c560592
commit 9129db4307
15 changed files with 122 additions and 79 deletions
-41
View File
@@ -1,8 +1,4 @@
using Gallop;
using RootMotion;
using RootMotion.Demos;
using RootMotion.Dynamics;
using RootMotion.FinalIK;
using SFB;
using System;
using System.Collections;
@@ -1323,41 +1319,4 @@ public class UmaViewerUI : MonoBehaviour
TextureExporter.exportAllTexture(Builder.CurrentUMAContainer.gameObject);
}
}
public void Debug()
{
var container = Builder.CurrentUMAContainer;
if (!container) return;
var animator = container.GetComponent<Animator>();
BipedRagdollReferences r = BipedRagdollReferences.FromAvatar(animator);
BipedRagdollCreator.Options options = BipedRagdollCreator.AutodetectOptions(r);
var ik = container.gameObject.AddComponent<BipedIK>();
ik.references.root = container.transform;
ik.references.pelvis = r.hips;
ik.references.spine = new Transform[] { r.spine, r.chest };
ik.references.leftThigh = r.leftUpperLeg;
ik.references.leftCalf = r.leftLowerLeg;
ik.references.leftFoot = r.leftFoot;
ik.references.rightThigh = r.rightUpperLeg;
ik.references.rightCalf = r.rightLowerLeg;
ik.references.rightFoot = r.rightFoot;
ik.references.leftUpperArm = r.leftUpperArm;
ik.references.leftForearm = r.leftLowerArm;
ik.references.leftHand = r.leftHand;
ik.references.rightUpperArm = r.rightUpperArm;
ik.references.rightForearm = r.rightLowerArm;
ik.references.rightHand = r.rightHand;
ik.references.head = r.head;
new List<IKSolver>(ik.solvers.ikSolvers).ForEach(i => i.IKPositionWeight = 0);
new List<IKSolverLimb>(ik.solvers.limbs).ForEach(i => i.IKRotationWeight = 0);
ik.solvers.lookAt.IKPositionWeight = 1;
ik.solvers.lookAt.headWeight = 0.8f;
ik.solvers.lookAt.bodyWeight = 0.2f;
ik.solvers.lookAt.target = Camera.main.transform;
//BipedRagdollCreator.Create(r, options);
//var master = PuppetMaster.SetUp(container.transform, 8, 9);
//master.FlattenHierarchy();
}
}