# SolveIK()

> Execute the IK solver.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Animations](/engine/6000.6/script-reference/unityengine/animations.md)
* **Assembly:** UnityEngine.AnimationModule

```csharp
public void SolveIK()
```

### Remarks

The humanoid IK solver is executed using the IK goal position, rotation, and weight currently set in the [AnimationHumanStream](/engine/6000.6/script-reference/unityengine/animations/animationhumanstream.md).

### Examples

```csharp
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;

public struct IKJob : IAnimationJob
{
    public TransformSceneHandle effector;
    public PropertySceneHandle positionWeight;
    public PropertySceneHandle rotationWeight;

    public void ProcessRootMotion(AnimationStream stream) {}

    public void ProcessAnimation(AnimationStream stream)
    {
        AnimationHumanStream humanStream = stream.AsHuman();
        if (effector.IsValid(stream) && positionWeight.IsValid(stream) && rotationWeight.IsValid(stream))
        {
            humanStream.SetGoalPosition(AvatarIKGoal.LeftFoot, effector.GetPosition(stream));
            humanStream.SetGoalRotation(AvatarIKGoal.LeftFoot, effector.GetRotation(stream));
            humanStream.SetGoalWeightPosition(AvatarIKGoal.LeftFoot, positionWeight.GetFloat(stream));
            humanStream.SetGoalWeightRotation(AvatarIKGoal.LeftFoot, rotationWeight.GetFloat(stream));
        }

        humanStream.SolveIK();
    }
}
```
