Get in car - Target Match

Hi everyone!
this time I’m trying to my sexy character get in the car. using the script from “Target Match” from “Mecanim Example Scenes” I could do that the character go to the target and open the door.
But when I put a blend tree, with the locomotion, the target doesn’t work. just that part, everything else, works fine.

any idea? or other way to put the character in one specific position an rotation?
the part of the code with problem, and images.


void Update ()
{

	if (animator)
	{
		AnimatorStateInfo state = animator.GetCurrentAnimatorStateInfo(0);

//********************** ENTER CAR *********************************************************************

		if (!inCar & Input.GetButton("Fire1")) 
		{
			animator.SetBool("Jump", true);
		}


		if (state.IsName("Base Layer.enter_Car")) 
		{
			animator.SetBool("Jump", false);
			
			animator.MatchTarget(LeftHand.position, LeftHand.rotation, AvatarTarget.LeftHand, new MatchTargetWeightMask(new Vector3(1, 1, 1), 0), animator.GetFloat("MatchStart"), animator.GetFloat("MatchEnd"));

			hasJumped = true;
			//enterCar();
		}
}

}


Its Works! :smiley:

And with Blend tree no more :frowning:

How did you get this result ?

–

1 Answer

1

no one helped me, but its okay u__u
after all, I change the way I was doing it.
this is the result! :smiley:

link text

Would love to know how you did that. I've been working on a wrestling game and trying to get two players to touch each other... No one seems to answer questions anymore. T.T

–