Hi there.
Question about Netcode for Game Objects and animation rigging. I have a Rig with a two bone IK constraint and I want to control it through the weight. I have tried altering this through a network variable and also RPC’s
I also have client network transforms on my characters and other parts.
Still through these methods the weight/ IK animation only updates on the players character but other characters do not update.
Would anybody possibly know why?
Thanks in advance !
NetworkVariable<int> IKRigWeight = new(0, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner);
void Start()
{
if (IsOwner)
{
animator = GetComponent<Animator>();
IKRigWeight.OnValueChanged += (oldVal, newVal) =>
{
R_HandIK.weight = newVal;
};
}
}
void Update()
{
if (IsOwner)
{
if (Input.GetKeyDown(KeyCode.I))
{
IKRigWeight.Value = R_HandIK.weight == 0 ? 1 : 0;
}
}
}