public void ProcessAnimation(AnimationStream stream) { float jobWeight = stream.GetInputWeight(0); if (jobWeight > 0f) { AnimationRuntimeUtils.SolveTwoBoneIK( stream, root, mid, tip, target, hint, cache.GetRaw(targetPositionWeightIdx) * jobWeight, cache.GetRaw(targetRotationWeightIdx) * jobWeight, cache.GetRaw(hintWeightIdx) * jobWeight, linkLengths, targetOffset ); } else { AnimationRuntimeUtils.PassThrough(stream, root); AnimationRuntimeUtils.PassThrough(stream, mid); AnimationRuntimeUtils.PassThrough(stream, tip); } }
public void ProcessAnimation(AnimationStream stream) { float w = jobWeight.Get(stream); if (w > 0f) { AnimationRuntimeUtils.SolveTwoBoneIK( stream, root, mid, tip, target, hint, targetPositionWeight.Get(stream) * w, targetRotationWeight.Get(stream) * w, hintWeight.Get(stream) * w, linkLengths, targetOffset ); } else { AnimationRuntimeUtils.PassThrough(stream, root); AnimationRuntimeUtils.PassThrough(stream, mid); AnimationRuntimeUtils.PassThrough(stream, tip); } }