Most skeletal animation in Rive is done by rotating the angles of bones. The position of a child bone changes according to the rotation of its parent. This means that positioning a bone at the end of a chain often requires you to rotate multiple bones above it to reach the desired pose. This type of skeletal posing is called Forward Kinematics.
Inverse Kinematics, on the other hand, allows you to work from the opposite point of view. You create a target to tell the final bone where it should point, and the IK system works backwards to find a valid orientation for the parent bones above it.
There are many applications for this technique, but some of the more common examples include making a character point at an item, or to make sure a character's feet stay perfectly planted on the ground.
For example, imagine trying to animate a character's idle pose, with their body moving slightly up and down with each breath. You'd start by animating a root bone (perhaps the pelvis) up and down to create the appearance of breathing. However, this animation would also cause the legs to move up and down. You would need to add more keys to the legs to make sure the feet still line up with the ground throughout the entire animation.
A much faster and more powerful technique would be to add an IK constraint for each foot. Now when the root bone moves up and down, the legs will automatically orient themselves so the feet remain perfectly floored. From an animation standpoint, this is a far simpler technique as only one bone is being keyed, making it a lot easier for you to iterate and focus on the final outcome.
For more examples, take a look at users' public files that use #IK.
1) Select the last bone in the chain that you want to affect with IK. This will be the owner of the constraint.
2) In the Inspector, add an IK Constraint.
3) Select your new IK Constraint either by clicking on it in the Inspector (where you just created it) or in the Hierarchy.
4) Use the IK Target button to pick your target Node.
5) Add another influenced bone. Each IK constraint can have up to 2 influenced bones. You can add more, but the system will only solve for 2 bones at a time. For this reason we recommend breaking more complex rigs into multiple IK systems instead of trying to add one IK that handles more than 2 bones. In most cases this will give you better control and flexibility.
Now try moving the target. You'll see that the bones automatically follow. Also try moving the root bone. Note that the chain still sticks to the target.
Use the Invert Direction toggle to swap the angle at which your IK system solves.
Animate the Strength property to control how much the influenced bones should follow the target. A strength of 0 means the IK Target won't affect the influenced bones at all.
To keep things efficient, you usually want to only use two bones in your IK chain. You can set up multiple IK constraints for more complex rigs. A common setup is to have an IK target for the feet of a character and another IK target for the two leg bones. The leg IK target is a child of the foot IK target so that moving the feet will also move the legs.
Notice how useful the IK targets are in the character below. They allow you to easily position the feet and legs with two control points. They also allow you to move the character from the hip, while the legs stay planted on the floor.