How to Inverse Kinematics


We have an avatar in the application and many other objects. Now I want to create a feature in which if I select any object the avatar will touch it with the hand. I have position of hand and the target object. Now I want to perform transformation of hand so that the knee and forearm also move with it. I researched about it and I found that I have to use inverse kinematics concept to achieve this.

Can anyone help me what should I do to achieve inverse kinematics? Any tutorials ?


Yes, there is some rudimentary support for IK in 3.1.
The KinematicRagdollControl class has an IK-mode.
You can access it with:

public Vector3f setIKTarget(Bone bone, Vector3f worldPos, int chainLength)

and then

public void setIKMode()

It should work for the use case you have in mind. I think the only actual tutorial is in the Cookbook, currently.