Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class CCDIKMasterSlider : MonoBehaviour {
- [Range(0f,1f)]
- public float weight = 0;
- [SerializeField]
- List<RootMotion.FinalIK.CCDIK> list = new List<RootMotion.FinalIK.CCDIK>();
- void OnValidate() {
- updateAll();
- }
- void Update() {
- updateAll();
- }
- void updateAll() {
- foreach(RootMotion.FinalIK.CCDIK ik in list) {
- if(ik != null) ik.GetIKSolver().IKPositionWeight = weight;
- }
- }
- }
Add Comment
Please, Sign In to add comment