Well it depends what you’re trying to do. If you wanted the character to “grab” an object when they are within range you could use a simple trigger When you’re in the trigger the weight for that IK part of the body will be 1, when not in the trigger it goes back down to 0.
If you wanted to slowly increment the movement with IK you could slowly increase the weight over time. Here is some pseudo code to better understand it:
while(ikWeight< 1)
{
currentWeight += Time.deltaTime;
ikWeight = currentWeight/ 1;
}
Essentially just going through and increasing your IK weight over time. Since the weight value maxes out at 1 you’ll utilize a fraction. Time.deltaTime will ensure that it slowly increments. I haven’t tested the above code, but it’ll give you an idea of how it would work. You could also subtract by Time.deltaTime as well to reverse it.