Search Unity

MatchTarget issue with Unity 2017.1

Discussion in 'Animation' started by sebsmax, Jul 13, 2017.

  1. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    118
    I have a very strange issue with Unity 2017.1, when I'm using MatchTarget, my character is teleported to a position near vector3.zero. With Unity 5.6.2 it's working perfectly.

    If I disable the matchTarget in Unity 2017.1, it works, but it's obviously not aligned.

    Code (CSharp):
    1.  animator.MatchTarget(climbNode.transform.position + getHipsPositions(BodyOffset, climbingPointDirection), anim.animationRotation, AvatarTarget.Body, new MatchTargetWeightMask(new Vector3(1, 1, 1), 1f),  0.4f, 1);
    It look like it's trying to matching target into local position applied to a world position
     
    Last edited: Jul 13, 2017
  2. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    118
    I have more details on this issue, changing form AvatarTarget.Body to AvatarTarget.Root fix the issue! (With a bit of ajustment for the position)