MouthIKCtrl.cs 643 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using kt.ik;
  3. using UnityEngine;
  4. [Serializable]
  5. public class MouthIKCtrl : FABRIKCtrl
  6. {
  7. public MouthIKCtrl(FullBodyIKMgr ik_mgr) : base(ik_mgr, FullBodyIKMgr.IKEffectorType.Mouth)
  8. {
  9. this.BlendCalc = AIKCtrl.BlendCalcType.Local;
  10. }
  11. public override void SetIKSetting(IKAttachParam param)
  12. {
  13. base.SetIKSetting(param);
  14. base.isNeedAttachTargetUpdatePreExec = true;
  15. }
  16. public override void OnPostFullBodySolverUpdate()
  17. {
  18. if (base.pointIKData.isIKExec)
  19. {
  20. Vector3 localPosition = base.chainBones[0].localPosition;
  21. base.OnPostFullBodySolverUpdate();
  22. base.chainBones[0].localPosition = localPosition;
  23. }
  24. }
  25. }