Skip to content

IKControl

Not yet Class Other

Specifies a control to generate a procedural animation pose using Inverse Kinematics.

Not implemented yet

This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.

0 Nova members · 24 modern Roblox members not implemented yet

Description

IKControl instances generate procedural animation poses using Inverse Kinematics (IK). They allow you to make characters respond realistically to their environment.

For example, you can make a character place its hand on a door handle exactly, and the character will do so independently of its position. IKControls provide the advantage of needing to create much fewer animations for your game while giving your experience a more realistic and polished feel.

IKControls must be a child of a Humanoid or AnimationController with an Animator and have all of their required properties set properly, otherwise they don't have any effect. The required properties are Type, EndEffector, Target, ChainRoot. As soon as those are set, the IKControl modifies the pose of your character as you specify. The following code sample demonstrates how to set up your first IKControl and get started with creating more realistic animations for your game.

You can use IKControls to make a character:

  • Rotate its head and torso to look at a point of interest in the world.
  • Modify its feet positions to respond to dynamic terrain. Adjust its legs and feet to place them accordingly on terrain with rocks and slopes.
  • Hold a gun and place its hands appropriately on the grip without needing to create animations for each gun in the game.
  • Aim at a point in the world, so that the tip of the gun point exactly at what you want to shoot. Especially useful in third person shooters.
  • Place its hands on the steering wheel of a car and follow it when it rotates.
  • Much more!

IKControl will override the animation for all the parts between the ChainRoot and the EndEffector. You can enable/disable it using Enabled or change how much they have an effect over the underlying animation using the Weight. Be careful: if you do not set up your IKControls correctly, you might generate bad and unrealistic poses!

Inheritance

Object → Instance → IKControl

Properties

Member Signature Summary
ChainRoot ChainRoot: Instance The last part that you are interested in moving your character. For example, the upper arm. Must be an ancestor of EndEffector and be a [Base…
Enabled Enabled: bool Toggles the control on and off. True by default.
EndEffector EndEffector: Instance The part that you are interested in moving to reach the Target. For example, the hand of your character. Must be a descendant of [ChainRoot](IKCon…
EndEffectorOffset EndEffectorOffset: CFrame An additional offset applied on top of the EndEffector in its local space to change where it moves.
Offset Offset: CFrame An additional offset applied on top of the Target to change where the EndEffector moves.
Pole Pole: Instance An optional instance that determines which way the chain bends. You can use this to specify which way an elbow or knee bends.
Priority Priority: int Specifies the order in which controls are solved. Higher values have higher priority.
SmoothTime SmoothTime: float Specifies the average number of seconds that it takes for the EndEffector to smoothly reach the Target.
Target Target: Instance The object that the EndEffector reaches for or points at. It can be anything that has a position in the world, such as [BasePart](BasePart.md…
Type Type: IKControlType Specifies how the solver satisfies this control.
Weight Weight: float Specifies the weight of the IK control target. Should be in the [0, 1] range.

Methods

Member Signature Summary
GetChainCount IKControl:GetChainCount(): int Returns the number of segments in the IK chain between the ChainRoot and the EndEffector.
GetChainLength IKControl:GetChainLength(): float Returns the total length, in studs, of the IK chain between the ChainRoot and the EndEffector.
GetNodeLocalCFrame IKControl:GetNodeLocalCFrame(index: int): CFrame Returns the CFrame of the chain node at the given index, relative to its parent node in the chain.
GetNodeWorldCFrame IKControl:GetNodeWorldCFrame(index: int): CFrame Returns the world-space CFrame of the chain node at the given index.
GetRawFinalTarget IKControl:GetRawFinalTarget(): CFrame Returns the world-space target CFrame the solver aims for before SmoothTime smoothing is applied.
GetSmoothedFinalTarget IKControl:GetSmoothedFinalTarget(): CFrame Returns the world-space target CFrame the solver aims for after SmoothTime smoothing is applied.
Solve IKControl:Solve(): null —

Roblox reference: IKControl

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.