We believe that everyone should have the right to get happiness from making games.
This asset supports Final IK by default. if you are using other IK, you will need to modify script execution order. At the end of this chapter, you’ll find configuration examples for several popular IK methods, such as Final IK, Bio IK, Unity 2D IK and Unity Animation Rigging. Even if the IK you are using is not listed, you can still make it work by applying the underlying theory.
Since most IK systems are designed for coupled skeletons, they cannot function correctly on decoupled skeletons. To ensure these IK scripts work properly, we need to create a familiar environment for them. We will generate a coupled virtual skeleton, similar to the one you typically use. Before the IK update, we will read the position and rotation data from the real skeleton and transfer it to the virtual skeleton. The IK script will then solve it on the virtual skeleton. After the IK update, the position and rotation data from the virtual skeleton will be written back to the real skeleton. To implement this process, we need to modify script execution order.
Both Scalable Bone and IK work properly when the execution order of the scripts matches the flow shown below.
If your IK scripts are not solved in LateUpdate(), or if you are unable to modify the execution order of the IK scripts, then we need to follow another script execution order. In this order, IK scripts will override the animation and cannot interpolate between the solving result and the animation.
If you don’t mind the IK calculations lagging by one frame, we can use a third method. Its advantage over the second method is that you can dynamically change the body proportions during runtime.
Before you begin, please familiarize yourself with the standard usage of your IK to avoid misidentifying the source of errors. Before proceeding, please setup Scalable Bone and create a virtual skeleton.
3.Set “Fixed Transform” to false on Final IK inspector.
3.In the inspector of ReadTransform, clear the bonePair and add the bones covered by IK. In the inpector of WriteTransform, Set “SyncBonePair” to true.