This is the simplest implementation of the ik foot placement algorithm.
-This implementation only works for humanoid rigs
To this implementation work you will need:
-A imported fbx character with HUMANOID configured rig type.
-A hierarchy structure similar to this one (needs the avatar on animator component to work).
-Don't forget to enable IKPass on AnimationLayer:
This implementation is the simplest, it should only be activated when the character is stationary.
When walking or doing any action that moves the legs, set the weight of the IKs to 0 and when the legs are stationary, set it to 1.
For that you can use the method "IsIkEnabled()" that is inside the script, whenever it returns "true" ik will be enabled and "false" will be disabled.
Example:
private bool IsIkEnabled()
{
if (IsPlayerWalking)
return true;
else
return false
}