Search Unity

Resolved Two Bone IK constraint causes humanoid rig to float high above where it should be.

Discussion in 'Animation Rigging' started by PowerJake, May 18, 2021.

  1. PowerJake

    PowerJake

    Joined:
    Nov 15, 2019
    Posts:
    64
    I have this character which I modeled and rigged myself. I put him through mixamo for idle and running animations and those work just fine. But when I set up a two bone IK constraint to make him grip his weapon and hit play, most of his body is sent far into the sky. He still appears to follow his actual collider's position, but with a giant offset that I do not understand how to control.

    Here are some screenshots to walk you through what it looks like and what my game object hierarchy looks like. "Player" contains the gameplay logic such as collision, movement, and equipping the gun. which should be irrelevant to this. "Crunch2Mixamo" contains the animator, rig builder, and bone renderer. "Rig 1" contains the rig component. And "IK arm.L" contains the constraint. You an see how I set up the constraint in the inspector window. "IK arm.R" is empty and will stay that way until I make the left side work. The red box marks "Grip" which is the target. The red circle marks "hint" which is the elbow hint.

    upload_2021-5-18_16-19-35.png

    And here is what happens when I hit play.

    Here in the game view, the gun is in the correct position at least. We can see Crunch's shadow over on the other corner of the test platform.
    upload_2021-5-18_16-21-17.png

    Everything looks small from way up here. Crunch is animating sorta normal aside from the offset. upload_2021-5-18_16-23-57.png

    With his left arm clipping inside of his body I can learn two things. First, I put the left grip and hint on the right side of the gun (fixing this does not correct the issue). Second, he is trying his best to grip the gun, but something isn't quite right. Beyond his position and the left arm, the animation is almost intact.
    upload_2021-5-18_16-24-36.png

    The grip and hint are still in the correct positions. I am out of file uploads so you have to take my word for it.

    This is my first time using my own model and rig in unity so I might have messed up somewhere in there but if it worked in mixamo I imagine it is good enough right? Any idea what is wrong here?

    EDIT: I found more details on the broken behavior but I don't know what to make of it. Disabling or setting the rig weight on "Rig 1" to 0 doesn't prevent the character from floating in the sky. The only way I found to stop him from going in the sky, as far as I know, is to ignore or disable "Rig 1" in the rig builder, which isn't very useful on a rig I am trying to use.

    ANOTHER EDIT: It looks like it may be the return of this bug. I am using unity version 2020.3.7f1 and animation rigging package version 1.0.3

    ANOTHER EDIT: I finally found the big pinned post about this topic haha sorry.
     

    Attached Files:

    Last edited: May 20, 2021
  2. JudyBootyStudios

    JudyBootyStudios

    Joined:
    Aug 16, 2020
    Posts:
    1
    Did you ever find the solution to this problem? I am having the same problem.
     
  3. macbobby913

    macbobby913

    Joined:
    Sep 20, 2020
    Posts:
    1
    Maybe a little late on this one, but could you paste the link to the post here? That will be appreciated.