Inverse Kinematics Example demo doesn't work

i download the mecanima demo from asset store, test the ik scene, it doesn’t work.

i acitve the ik, then move the effector sphere, but nothing happened.

what should i do, thanks!

Go into playmode first, Select U_Character_REF in your Hierarchy view, in the inspector you should see a script call ‘IK’ attached to this GO, check Ik Active. make sure that the weight for each effector is at least greater than 0 and then select any effector and move them.

Sonny

Trying to get IK to work also - cut and pasted the script from the reference manual, but it does not seem to work at all:

Can’t seem to figure how what I’m doing wrong.

EDIT: Found the problem: the code has to be in the OnAnimatorIK function, I had it in Update :slight_smile:

effectively it has to be in OnAnimatorIK, simply because mecanim will overwrite any data you did set in Update function for the IK goal with the FK pose retargeted from the blended clip

does this demo work in the free version of unity? because the effectors in the demo scene arent doing anything for me either when the IK checkbox is on

Hello,
After trying to run Mecanim “Inverse Kinematics Sample” scene correctly, I have just concluded that this requires a “Unity Pro” license.

As @Proportion1, when I moved the effectors, nothing happened.
=> I completed/traced the code and I realized that Vector3 returned by “avatar.GetIKPosition(AvatarIKGoal.LeftFoot);” is not the same as
previously set “avatar.SetIKPosition(AvatarIKGoal.LeftFoot,leftFootObj.position);” !!! It even systematically returns (0, 0, 0).

Other: in http://unity3d.com/unity/licenses, we can read that “Mecanim: IK Rigs” is not checked for “a simple Unity license” (but it is checked for a “Unity Pro license”…).
This would be quite obscure not to warn us, but this should be that !!!..

Can someone confirm ?
Thank you.

Yes,

IK is only available in pro

Thank you.
I can confirm: “Inverse Kinematics Sample” is ok since I got the free trial PRO license.

USEFUL: http://answers.unity3d.com/answers/650502/view.html