Rotating md5joints manually?

Hi, I was just checking a thread where was the code that makes the ragdoll walk.



I have a md5 animation of a person shooting (a recoil animation). Is it possible to rotate the shoulder joint so that hand points to the spot where the camera is looking and in the same time rest of the hand is orientated based on the shoulder orientation.



Currently I am pointing an arrow to the aim point by using a ChaseCamera by Core-Dump.



I have:



     bodyMesh = Player.class.getClassLoader().getResource("data/models/md5/ShooterShootNew.md5mesh");

     bodyAnim = Player.class.getClassLoader().getResource("data/models/md5/ShooterShootNew.md5anim");

     

     importer = new MD5Importer();

     

     try {

        importer.load(bodyMesh, "ModelNode", bodyAnim, "shooterShootAnim", Controller.RT_CLAMP);

     } catch (IOException e) {

        e.printStackTrace();

     }

     

     shooterNode = (MD5Node) importer.getMD5Node();

     shooterShootAnim = (MD5Animation) importer.getAnimation();

     shooterAnimController = (MD5Controller) shooterNode.getController(0);



And I know I  can use:

Joint  shoulderJoint = shooterNode.getJoint(16);

to get the shoulder joint named "Bip02 R Clavicle" which is pretty much the shoulder.

But I have no idea what to do next. I wish there was like a method shoulderJoint.lookAtWorldPoint(a vector3f where gun is aimed in the scene).



Can you tell me how its possible? Or do I have to make the arm animation seperately and then attach it to the shooters torso?


Please, anybody?

Hopefully someone else with a bit experience with animation can give you some hints.



If not, make a very small example, which we can copy paste and play with.