Jump to content

Adept

IK Wrist Joint Maintain Rotation?

Recommended Posts

Hi! I have been working on animating characters holding rifles for a project... I have been having a pretty hard time figuring out the best setup for the arm/hand/gun rig to get it to do exactly what I want it to. I am not too good at explaining it, but I want to use IK to control the position of the hands (simply because it is easier and looks better), but I want the wrists to stay in relative rotation values to the rifle unless I edit/animate them. My main issue is in trying to figure out the hierarchy and constraining here. What I want to happen (in order) is:

1) Right hand goal/right hand wrist rotation controls the position/rotation of the rifle

2) Gun moves with right hand correctly

3) Left hand stays 'glued' to its set position on the rifle, and stays there as I move the right hand and consequently the rifle around

 

I have parts 1 and 2 figured out (that was easy) but figuring out how to keep the left hand not only at the same relative position as the rifle, but also maintain its rotation and contact points on the rifle the same. Here's a gif to show the issue:

https://gyazo.com/8fa39c430527df3b144a5bb4ec15c79c

The left hand target null follows the rifle fine. But as you see, the hand does not look to be 'gripping' the rifle, it just slides around. My heirarchy goes something like this:

 

>right hand goal

>hips

    >other bones leading down to right hand wrist

          >rifle

                 >left hand goal

I have tried removing the left hand goal from the bone hierarchy and using a PSR tag in a few different ways with no success. I'm sure there has to be a way to get this to work, anyone got any ideas? 

Thanks!

Share this post


Link to post
Share on other sites

I wouldn't put any controllers in with the bones. Honestly, I wouldn't put the rifle object in a controller hierarchy either - just create a null as a child of the R Hand Goal, call it "Rifle Anchor," and put a PSR tag on your rifle object. Because the rifle controller is a child of the hand goal, it will automatically move with it. 

Next, add a null as a child of your rifle controller in the place where you want the left hand to grip, then use a PSR tag on the wrist goal. Again, as a child of the other, it automatically moves with it.  What's nice is that you can simply drop the strength of the PSR tag and the left hand will drop off the rifle - at 0% it will be wherever the L Hand Goal is positioned. (At 100% strength, the anchor null has essentially become the L Hand Goal, so you can always animate it if you want to shift the hand on the rifle.)

 

> R Hand Goal

   >>  Rifle Anchor

       >>> L Hand Anchor

> L Hand Goal  (PSR tag to L Hand Anchor)

> Rifle Object (PSR tag to Rifle Anchor

 

I used this all the time with my character, primarily to keep a hand in the same spot on a steering wheel while simply animating the wheel turning back and forth.

Share this post


Link to post
Share on other sites
  • Topic Author
  • 20 hours ago, DeCarlo said:

    I wouldn't put any controllers in with the bones. Honestly, I wouldn't put the rifle object in a controller hierarchy either - just create a null as a child of the R Hand Goal, call it "Rifle Anchor," and put a PSR tag on your rifle object. Because the rifle controller is a child of the hand goal, it will automatically move with it. 

    Next, add a null as a child of your rifle controller in the place where you want the left hand to grip, then use a PSR tag on the wrist goal. Again, as a child of the other, it automatically moves with it.  What's nice is that you can simply drop the strength of the PSR tag and the left hand will drop off the rifle - at 0% it will be wherever the L Hand Goal is positioned. (At 100% strength, the anchor null has essentially become the L Hand Goal, so you can always animate it if you want to shift the hand on the rifle.)

     

    > R Hand Goal

       >>  Rifle Anchor

           >>> L Hand Anchor

    > L Hand Goal  (PSR tag to L Hand Anchor)

    > Rifle Object (PSR tag to Rifle Anchor

     

    I used this all the time with my character, primarily to keep a hand in the same spot on a steering wheel while simply animating the wheel turning back and forth.

    I did this (shown in hierarchy on right) and it does not really fix the issue with the hands rotating off it....  the IK goals do not control the rotation of the wrist, they simply control the position of the wrist. The rotation is up to the actual bone for the hand. 

     

    EDIT:

     

    Aha!! I got it. I set up two more nulls, "l hand rotation" and "r hand rotation", and set their psr to exactly the wrist joint where I want it. Then I moved them under the rifle anchor, then set only rotation constraint tags to the actual wrist bone. This worked like a charm! Thanks for the tips. Here is my final hierarchy for anyone else looking into this topic:

     

    >Rifle (PSR TAG TO Rifle_anchor)

    >Left_hand_goal (PSR TAG TO L_hand_anchor)

    >Right_hand_goal

       >>Rifle_anchor

          >>>L_hand_rotation

          >>>R_hand_rotation

          >>>L_hand_anchor

    >Bone hierarchy down to wrists:

       >>Left_wrist (ONLY ROTATION CONSTRAINT TO L_hand_rotation)

       >>Right_wrist (ONLY ROTATION CONSTRAINT TO R_hand_rotation)

     

    Works like a charm!

    Share this post


    Link to post
    Share on other sites

    Sorry!  Yes, I too have learned to use two separate controllers for the wrist: one to determine the position of the IK chain, and the second to control the rotation of the wrist bone.  I didn't think of that when I responded, but it's a crucial to separating the rotation of the wrist from the IK. 

    Share this post


    Link to post
    Share on other sites

    You can instead of having two controllers to animate(which animators won't really like), instead constrain the IK tip joint(the wrist in this case) to the goal null, and put that underneath you Wrist Controller. That way Positioning and rotating the Wrist controller would also adjust the rotation of the child which affects the wrist joint.

    Share this post


    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×