Inverse Kinematics

The process of creating a realistic animation for a character often requires many iterations and minor adjustments of the various joints. Inverse Kinematics (IK) is a common technique in computer animation to efficiently make characters move and interact realistically with their environment. With IK, you can pose and animate multiple character parts by posing or adjusting a single object.

This animation technique can provide solutions to the following examples:

Grab and pose a character's hand while automatically adjusting the related limbs, such as the wrist, elbow, and shoulder.
Make a character's feet can interact realistically on different surfaces and slopes.
Grab and move a single target object to quickly create realistic interactions with your character and props.


IKControl

You can use an IKControl to procedurally add IK to your character rigs outside of the Animation Editor. Studio allows you to programmatically apply IK to all characters, such as R15, Rthro, and custom imported skinned characters, to create realistic movement and interactions in your experience.

When adding an IKControl, set the required properties correctly to avoid unexpected and unnatural animation results. As with all animation, test your IKControls to ensure that you achieve the desired behavior.

Enabling the IKControl Beta

To use IKControls in your experience, first enable the IKControl beta feature.

To enable the IKControls beta feature:

  1. In the menu bar, click File. A contextual menu displays.

  2. Select Beta Features. The Beta Features window displays.

  3. In the beta features list, enable IK Controls.

  4. Click the Save button.

  5. Restart Studio.


Required Properties

When adding a IKControl to your character's Humanoid or AnimationController, you must set the following required properties to enable IK:

Property Description
Type Specifies the behavior type of the IK control. See IKControlType for the list of behavior options. Common behavior types are Position or Transform.
EndEffector A BasePart or Bone in your character rig that tracks toward the Target. For example, you can set a LeftHand bone as a EndEffector to reach a doorknob object set as the Target.
Target The object the EndEffector reaches or points toward. A Target can be any object with with a world position.
ChainRoot Defines the chain of BaseParts or Bones that the IKControl affects. All connected parts between the ChainRoot and the EndEffector are affected by the IKControl using the behavior type defined.

For example, if your character's LeftHand is set as the Target, you can apply IK to the entire left arm by setting ChainRoot to the LeftUpperArm. To apply IK just to the parts below the elbow, set ChainRoot to the LeftLowerArm.

Testing IKControls

You can add and edit IKControl programmatically or directly through the Explorer. You can even add and make changes to IKControl during a Play test to quickly check how various properties affect a character's movements.

To quickly test your IKControl using an Attachment as a target:

  1. In the Test tab, select Play to start the Play test.

  2. In the Explorer, navigate to Workspace → your user's Model. This Model instance is named as your current Roblox account.

  3. Click the icon next to your character model's HumanoidRootPart and add an Attachment.

  4. Select the Attachment and use the Move tool to position the object in front of your character in the viewport.

  5. In the Explorer window, select the icon next to your character's Humanoid and add an IKControl.

  6. Select the IKControl and set the following property values in the Properties panel:

    1. Type: Select Transform from the dropdown.
    2. EndEffector: Select your model's LeftHand MeshPart in the Explorer.
    3. Target: Select the newly created Attachment object in the Explorer.
    4. ChainRoot: Select your model's LeftUpperArm MeshPart in the Explorer.
    IKControl Properties
    Explorer Panel - Character Model

    Your character's left arm should now reach for the target Attachment. You can experiment with moving the Attachment or editing the IKControl properties to achieve different results.