Mecanim Target Matching for Generic Rig Issue

I am unable to use target matching for my quadruped which uses a generic rig rather than a humanoid. This question is similar to the post http://answers.unity3d.com/questions/386593/mecanim-matchtarget-generic-rig.html which haven’t been answered at all so I will try on this forum instead.

For testing purposes, I have swapped out my quadruped and replaced it with a simple cube animation fbx going from world 0,0,0 to say 0,0,1 and have 2 bones for root motion purposes. I have followed (more or less) the target matching example scene provided by Unity. I have also created an empty object called “target” so that instead of just moving to 0,0,1, it would move and rotate to the target’s position + orientation. I have attached the script and the target matching line to the cube:

// Update is called once per frame
	void Update () {
		if(animator) {
			animator.MatchTarget(target.position, target.rotation, AvatarTarget.Root, new MatchTargetWeightMask(new Vector3(1,1,1), 1), 0f, 1f);	
		}
	}

Nothing works apart from the animation going towards the Z axis and not the target. Any idea what could be wrong with it? Does target matching works with a generic rig?

Target Matching only work with Humanoid rig for now.

Did this ever change, or does it still only work for Humanoid rigs?

Still only work on Humanoid. We are working on the generic version but it not yet ready.

Is it ready yet? I have some spiders waiting for retargetting… :wink:

not yet sorry

Thanks for info anyway!

@Mecanim-Dev Is it available now or still we can’t use target matching for non-humanoid?

match targeting for generic rig should be available in 5.4 which is in beta right now.
Enjoy!

Sorry for the forum necro but - i’m assuming that Animator.MatchTarget only allows for RootMotion matching (AvatarTarget.Root) ?

Should it be generating an error if another joint is matched (it looks like it silently only does the matchtarget on rootmotion?)

it should work for any joint in the AvatarTarget enum

if it doesn’t then it a bug.
You can log it and we will investigate the issue.

Thx

@TitaniumBrendan Sorry my bad I didn’t read the whole thread, but since this question is about generic rig then yes in this case it expected that it will only work for the root

@Mecanim-Dev So is there any other way to do target matching on generic rigs with other bones than root?
as far as I could find out, its not even possible to look at an animaiton clip and extract the bone rotations at a certain time, and then calculate the transform matrices myself.