Download

[Help] Moving rig/bone in realtime like in Surgeon simulator

Hello,

I’m making an FPS and the character can see his arms an legs, I want the hand to follow a point, a little bit like in Surgeon simulator : the hand follows the mouse.
The problem is that I need the shoulder to stay in position and the elbow to automatically move to the only available position (the three bone are a triangle).
I made a drawing to explain it.
So is there a way to rotate the bone to have the hand at the target point ?

I can’t give you a tutorial because I’m not 100% certain about it myself but my suggestion would be to look into IK or Inverse Kinematics. Here’s the unreal documentation for it: IK Setups | Unreal Engine Documentation :slight_smile:

As leon said, you can simply use IK for this. Have a look at the TwoBoneIK blueprint component.

Perfect !
I looked at it in the content sample but I thought it was for reversing the animation ^^.
Thank you very much guys, relly usefull !

EDIT : I don’t understand what does the Joint Target Location value do in the Two Bone IK node ?

Happy to help! :smiley: Make sure to ask if you have more questions.

I don’t understand what does the Joint Target Location value do in the Two Bone IK node.

Hey Thomson_Skelington -

I am going to link you over to AnswerHub, there is a post which may directly answer you question. How do I attach IK to another bone in the same skeleton? - UE4 AnswerHub](How do I attach IK to another bone in the same skeleton? - UE4 AnswerHub)

Eric Ketchum

Mhm… I still don’t get want it does… Explain it again please :slight_smile:

The Joint Target is responsible for keeping the chain rotation from going whacky, basically.

Check out this link What is "Joint Target" in the IK node? - UE4 AnswerHub and this one Does UE4 have pole vectors for IK? - UE4 AnswerHub

You basically just need to set it to be the middle bone (i.e., if you have thigh -> knee -> foot, it’s the knee bone).