Version: 1.8
LanguageEnglish
  • C#

TFBIK

class in UnityEngine.Animations

/

Inherits from:Behaviour

/

Implemented in:UnityEngine.AnimationModule


Implements interfaces:IKBase, MultiGoalIKBase

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Full Body IK solver.

This class implements a Full Body IK solver, allowing for more flexible and accurate manipulation of bones in a skeletal system. It is designed to work with a set of goals and can dynamically adjust bone positions and rotations based on the specified targets.

See Also: IKBase,MultiGoalIKBase.

Properties

boundBonesGets the set of bound bones used for IK goals.
constraintsGets or sets the collection of rotation/translation constraints applied to bones during IK calculations. These constraints restrict bone movements to anatomically plausible ranges (e.g., joint limits) to prevent unnatural poses.
dampingGets or sets the damping factor (0-1 range) applied to bone adjustments. Higher values reduce the "aggressiveness" of solver updates, smoothing out rapid bone movements and preventing overshooting goals; lower values make adjustments faster but may cause instability.
freezeRootGets or sets a value indicating whether to lock the root bone's position and rotation during IK calculations. When enabled, the root bone remains fixed, and the solver only adjusts child bones to reach goals; when disabled, the root may move to assist with goal alignment.
goalsGets the IK goals associated with this solver.
initializedIndicates whether the IK solver has been initialized.
iterationsGets or sets the maximum number of iterations the solver runs per IK update. More iterations improve goal alignment accuracy but increase computational cost; fewer iterations are faster but may result in incomplete goal reach.
prePullRootGets or sets a value indicating whether to enable "pre-pull" adjustment of the root bone. When enabled, the solver first shifts the root bone closer to distant goals before calculating individual bone rotations, improving reach for far targets while maintaining natural skeletal structure.
rootBoneGets the root bone of the IK chain.
rotationStrengthGets or sets the global strength multiplier (≥0) for rotation adjustments. A value of 1.0 uses default strength; values greater than 1.0 increase rotation influence (bones rotate more to match goal orientation); values less than 1.0 decrease influence (bones rotate less).
rotationToleranceGets or sets the angular threshold (in degrees) for rotation convergence. If the average rotation difference between bound bones and their goals falls below this value, the solver stops iterating early, balancing orientation accuracy and performance.
stretchRatioGets or sets the maximum allowed stretch ratio (≥1.0) of the skeletal chain. A value of 1.0 disables stretching (bones maintain fixed length); values greater than 1.0 allow controlled stretching (e.g., 1.05 permits 5% stretch) to reach distant goals, with higher values enabling more stretch.
translationStrengthGets or sets the global strength multiplier (≥0) for translation adjustments. A value of 1.0 uses default strength; values greater than 1.0 increase translation influence (bones move more to reach goals); values less than 1.0 decrease influence (bones move less).
translationToleranceGets or sets the distance threshold (in world units) for translation convergence. If the average distance between bound bones and their goals falls below this value, the solver stops iterating early, balancing accuracy and performance.
typeGets or sets the algorithm type of the Full Body IK solver (e.g., pseudo-inverse damped least squares, PBD-based). Determines the core method the solver uses to calculate bone adjustments.

Public Methods

AddTargetPairAdd new target pair.
ClearAllTargetsRemoves all target pairs (goal + bound bone) from the solver. Resets the solver's target list to an empty state.
ClearInvalidTargetsClears invalid targets whose bound bone is null or goal is null.
FixTransformsResets bone transforms before applying IK calculations.
GetRotationEnabledRetrieves the rotation enable state for the target pair associated with the specified goal.
GetRotationWeightRetrieves the rotation influence weight for the target pair associated with the specified goal. Controls how strongly the solver adjusts the bound bone's orientation to match the goal.
GetTranslatioEnabledRetrieves the translation enable state for the target pair associated with the specified goal.
GetTranslationWeightRetrieves the translation influence weight for the target pair associated with the specified goal. Controls how strongly the solver adjusts the bound bone's position to match the goal.
InitializeInitialize IK solver.
IsValidChecks whether the solver has been set up properly.
RemoveTargetRemoves the target pair associated with the specified goal from the solver. If no pair matches the goal, the method has no effect.
SetRotationEnabledSets whether rotation adjustments are enabled for the target pair associated with the specified goal. Has no effect if the goal is not found in the solver.
SetRotationWeightSets the rotation influence weight for the target pair associated with the specified goal. Higher values increase the solver's focus on aligning the bound bone's orientation with the goal. Has no effect if the goal is not found in the solver.
SetTranslationEnabledSets whether translation adjustments are enabled for the target pair associated with the specified goal. Has no effect if the goal is not found in the solver.
SetTranslationWeightSets the translation influence weight for the target pair associated with the specified goal. Higher values increase the solver's focus on aligning the bound bone's position with the goal. Has no effect if the goal is not found in the solver.

Inherited Members

Properties

enabledEnabled Behaviours are Updated, disabled Behaviours are not.
isActiveAndEnabledReports whether a GameObject and its associated Behaviour is active and enabled.
gameObjectThe game object this component is attached to. A component is always attached to a game object.
tagThe tag of this game object.
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Methods

BroadcastMessageCalls the method named methodName on every MonoBehaviour in this game object or any of its children.
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentGets a reference to a component of type T on the same GameObject as the component specified.
GetComponentInChildrenGets a reference to a component of type T on the same GameObject as the component specified, or any child of the GameObject.
GetComponentIndexGets the index of the component on its parent GameObject.
GetComponentInParentGets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject.
GetComponentsGets references to all components of type T on the same GameObject as the component specified.
GetComponentsInChildrenGets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject.
GetComponentsInParentGets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject.
SendMessageCalls the method named methodName on every MonoBehaviour in this game object.
SendMessageUpwardsCalls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static Methods

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.
InstantiateAsyncCaptures a snapshot of the original object (that must be related to some GameObject) and returns the AsyncInstantiateOperation.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.