r2mods/ilspy_dump/ror2_csproj/RoR2/IKSetWeightFromAnimatorFloa...

24 lines
429 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using Generics.Dynamics;
using UnityEngine;
namespace RoR2;
public class IKSetWeightFromAnimatorFloat : MonoBehaviour
{
public Animator animator;
public string animatorFloat;
public InverseKinematics ik;
private void Update()
{
float @float = animator.GetFloat(animatorFloat);
Core.Chain[] otherChains = ik.otherChains;
for (int i = 0; i < otherChains.Length; i++)
{
otherChains[i].weight = @float;
}
}
}