Search Unity

Hands on weapon delayed with Multi-Position Constraint PLEASE SAVE ME!

Discussion in 'Animation Rigging' started by K3IRRR, Jul 15, 2020.

  1. K3IRRR

    K3IRRR

    Joined:
    Feb 5, 2020
    Posts:
    2
    Hi everyone and thanks for attending this question,

    I'm using multi aim constraint to aim the weapon but if I aim the weapon up or down the hands are lagging behinds their Two Bone IK constraint targets. This is also the case when I am not aimed and just running with the weapon, the hands are still lagging behind.

    this only seems to happen with the weapon being parented to the right shoulder with Multi-Position Constraint or being aimed with Multi-Aim Constraint.

    PLEASE HELP! I'VE BEEN TRYING FOR WEEKS TO SOLVE THIS!


    upload_2020-7-15_19-54-18.png
    upload_2020-7-15_19-54-48.png
     
  2. Jebtor

    Jebtor

    Unity Technologies

    Joined:
    Apr 18, 2018
    Posts:
    115
    Hey, without a more details or a small setup replicating the issue it is quite hard to exactly tell what is going wrong. The first thing that comes to mind for the issue you are describing is the constraint execution order. Both constraints and rigs are executed in a specific order.

    The issue you describe could arise in the following example. Lets say you have a twoboneIK constraint that moves the arms, after this there is another constraint that rotates the spine. The rotation on the spine influences the rotation of the arms. Thus resulting in the arms to miss their target. Only the next frame the twoBoneIK constraint will update and reach for it target correctly. But after this the spine might get rotated too.

    In this case what you want to do is first execute the spine constraint and then update the arms. Details on how to control the order of constraints can be found in the RigComponent section of the documentation.

    I hope this helps :)
     
    K3IRRR likes this.
  3. K3IRRR

    K3IRRR

    Joined:
    Feb 5, 2020
    Posts:
    2

    Thank you very much, that page was helpful.
    I was using Multi-Position Constraint and Multi-Parent Constraint on the same gameobject within a rig and they seemed to clash with each other
    In the end i just started again using only the Multi-Parent Constraint which seems to of worked.
    if really difficult to get the execution order correctly without inferring with the animator or anything else

    thanks again
     
    Jebtor likes this.
  4. Vorrin

    Vorrin

    Joined:
    Jan 14, 2013
    Posts:
    10
    Hello @Jebtor!

    I am having a similar problem, I have a gun, animating(ie. from idle to aiming), that is driven by a common animator-led animation, and two two-bone-IK driven arms that are grabbing for it, to hold it, their IK's targets set by a Multi-Parent constraint, using the gun's transform as source.

    The hierarchy of the rigs is Rig->Multi-Parent Constraint->TwoBoneIK, so it should be in line with what you helpfully specified here (ie. the Multi-Parent Constraint runs first, moves the IK target to the correct position, the hands IK to said position).
    The issue is, that there's a clear 1 frame delay, between the gun animations moving the gun to a new position, and the IK targets, driven by a Multi-Parent constraint,following said movement.

    Any idea how to go about this?

    Thanks!