Search Unity

Resolved Using Override Transform constraint on an IK target

Discussion in 'Animation Rigging' started by Ward_L, Jun 29, 2021.

  1. Ward_L

    Ward_L

    Joined:
    Jun 3, 2017
    Posts:
    16
    Hi,
    Inspired by this gdc talk by Alexander Bereznyak I'm trying to add constraints to IK targets that have animations transferred onto them.

    I'm using Unity 2021.1.10f.1. If I add an override transforms constraint to an IK target it snaps to the override transforms' target but does not affect the FK chain.
    I have tried adding Rig Transforms components here and there but without success.

    Is it even possible, if not any ideas on how to get a similar result?

    To be more specific, right now I looking for a way to keep the legs in IK so that I can easily avoid them clipping through the ground and when the feet get to a certain frame of the animation they stay planted in world space.
     

    Attached Files:

  2. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    383
    I have been digging into this for the past 6 months. My final conclusion is Umotion with FinalIk callback inclusion.
    I am going through Umotion in detail right now. He has all the 'under the hood' variables exposed and connected in a very cohesive way.
    I hope this helps.
     
    ROBYER1 and Ward_L like this.
  3. Ward_L

    Ward_L

    Joined:
    Jun 3, 2017
    Posts:
    16
    @giantkilleroverunity3d Umotion looks interesting and very complete so I might explore more using it.
    But for now I found a solution that works for me.

    Firstly having two IK constraints per foot. One has the FK animation transferred onto it and it's weight is set to zero (the constraint component might as well be removed). The second one is scripted to follow the first ones position and rotation as much as possible without going through the ground.

    Secondly, having the character controller on a parent of the object with the rig components. This let's me move down the object containing the rig components until both feet touch the ground without messing with the character controller, keeping separate the animation side of the character from the game design side.

    Something else I will be trying is to have the feet be placed on the opposite side of the character's acceleration.
     

    Attached Files:

  4. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    383