Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

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:
    384
    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:
    384