public void Add(IKLimbData data, float weight) { jobData.positionWeight += data.jobData.positionWeight * weight; jobData.rotationWeight += data.jobData.rotationWeight * weight; jobData.hintWeight += data.jobData.hintWeight * weight; jobData.position += data.jobData.position * weight; jobData.hintPosition += data.jobData.hintPosition * weight; jobData.rotation *= Quaternion.SlerpUnclamped(Quaternion.identity, data.jobData.rotation, weight); }
public void Mix(IKLimbData data, float weight) { jobData.positionWeight = Mathf.LerpUnclamped(jobData.positionWeight, data.jobData.positionWeight, weight); jobData.rotationWeight = Mathf.LerpUnclamped(jobData.rotationWeight, data.jobData.rotationWeight, weight); jobData.hintWeight = Mathf.LerpUnclamped(jobData.hintWeight, data.jobData.hintWeight, weight); jobData.position = Vector3.LerpUnclamped(jobData.position, data.jobData.position, weight); jobData.hintPosition = Vector3.LerpUnclamped(jobData.hintPosition, data.jobData.hintPosition, weight); jobData.rotation = Quaternion.SlerpUnclamped(jobData.rotation, data.jobData.rotation, weight); }
public IKLimb(IKLimbData data) { this.data = data; }