Hi Developers!
We are thrilled to announce a new animation control coming to Studio. Today, we are releasing IKControl, which is a new Instance type that allows you to create realistic procedural animations on your rigs using Inverse Kinematics (IK), as a beta in Studio.
For those unfamiliar with IK, inverse kinematics allows an animator to grab and place the end of a kinematic chain, such as a character’s hand or foot, and it will automatically solve the in-between joints positions and orientations to achieve the result you are after. It is used extensively in computer animation to ensure characters can accurately make contact with the environment around them.
Here are just a few of the things you can have your characters do with this new animation tool:
- Hold weapons and tools
- Reach for objects, buttons, door handles, and more
- Place feet appropriately on the ground
- Aim weapons
- Look at points of interest
- Have two characters shake hands or hug
- Pose characters by just moving their hands or feet
To get started, you will first need to enable the beta “IK Controls” in the Studio Beta Features menu. Once enabled, you can then create an IKControl Instance as a child of your Humanoid or AnimationController and set a few properties on it:
-
Type: how you want your control to behave. Try
Position
orTransform
if you are unsure. - EndEffector: the joint in your character you want to move. For example the hand.
-
ChainRoot: the first joint in your character that can contribute to the movement. For example the shoulder. Must be an ancestor of
EndEffector
on the same character. - Target: what you want your character to reach for.
Here is the documentation page and a guide for further details on how to use IKControls to set up these examples, and you can find a code snippet below!
-- the character you want to modify. Place this script as a child of your character
local character = script.Parent
local ik = Instance.new("IKControl")
ik.Parent = character:FindFirstChildOfClass("Humanoid") -- or "AnimationController"
ik.Type = Enum.IKControlType.Position
ik.EndEffector = character:FindFirstChild("LeftHand", true)
ik.ChainRoot = character:FindFirstChild("LeftUpperArm", true)
ik.Target = workspace.target -- an Attachment or BasePart you created in your world
We are releasing this feature initially into our beta program to collect feedback and answer your questions. We will continue to add features that you would like to see, so let us know what you think below!
Thank you!