PuppetMaster can be used together with Unity's own built-in Animator IK as well as Final IK. The former is limited to Humanoids only and can be used to alter the target pose programmatically before the PuppetMaster reads it for following. Final IK opens up much more possibilities such as modifying the pose with full body IK or applying an IK pass on top of the physical simulation for cosmetic corrections or accurate aiming.
To use PuppetMaster with Final IK, import both packages to the project, then import also "Plugins/RootMotion/PuppetMaster/_Integration/Final-IK.unitypackage". The package comes with scenes and scripts demonstrating the application of IK both before and after PuppetMaster solves.
IK Before Physics:
We might be interested in using IK to change the Target pose for various reasons, for example keeping balance, aiming, grabbing, protecting from incoming collisions or even procedural locomotion. When using Unity's built-in IK solution, it will be automatically applied on top of the animation in the Mecanim update cycle. The components of Final IK will also update by default before PuppetMaster reads. If you need them to be updated in a specific order, you can use the IKBeforePhysics.cs component or disable them and update their solvers manually using the PuppetMaster.OnRead delegate:
IK After Physics:
Each frame PuppetMaster is done solving and mapping the Target character to the ragdoll, we have a chance to make minor adjustments (that don't change the physics anymore) to the character pose. This can be useful for example when making sure hands are perfectly fixed to some points or doing aiming correction with AimIK. Unity's built-in IK can not be applied after PuppetMaster has mapped the Target character to the ragdoll pose. Final IK components can be updated whenever necessary and in this case we need to do it in the PuppetMaster.OnWrite delegate: