Mecanim Curves not returning collider to original position

Hello,

I have a run and a jump on a character using mechanim. These animations are “in place.” I’m using curves like in the tutorial and they get my collider to position and scale properly when jump is pressed. However, the collider does not return to its initial position and scale.

My jump animation is not looped and nothing is baked to the poses. I guess since I am using in place anims, I’ll have to lerp the collider?

Here is my code just in case.

			if(Input.GetButtonDown("Jump"))
			{
				anim.SetBool("Jump", true);
		
				
			}
		
		
		// if we are in the jumping state... 
		else if(currentBaseState.nameHash == jumpState)
		{
			//  ..and not still in transition..
			if(!anim.IsInTransition(0))
			{
				if(useCurves)
					// ..set the collider height to a float curve in the clip called ColliderHeight
					col.height = anim.GetFloat("ColliderHeight");
					col.center = new Vector3(0,anim.GetFloat("ColliderUp"),0);
					
				// reset the Jump bool so we can jump again, and so that the state does not loop 
				anim.SetBool("Jump", false);
				
			}

So, I got this to work…kinda. If anyone knows of a better solution, I’d like to know.

if(Input.GetButtonDown("Jump"))
			{
				anim.SetBool("Jump", true);
				timeJump ();
				
			}
		
		// if we are in the jumping state... 
		else if(currentBaseState.nameHash == jumpState)
		{
			//  ..and not still in transition..
			if(!anim.IsInTransition(0))
			{	
				
				// reset the Jump bool so we can jump again, and so that the state does not loop 
				anim.SetBool("Jump", false);
			}
			else
			{
			
			//col.center = new Vector3(0, Mathf.Lerp (jumpCol,groundCol,Time.deltaTime * jumpTime),0);
			//col.height = 29f;
			timeLanding ();
			
			}

void landCollider ()
	{
		col.center = new Vector3(0, Mathf.Lerp (jumpCol,groundCol,Time.deltaTime * jumpTime),0);
		col.height = 29f;
		
	}
	
	void timeLanding ()
	{
		Invoke ("landCollider", 0.1f);	
	}
	
	void jumpCollider ()
	{
		col.center = new Vector3(0, Mathf.Lerp (groundCol,jumpCol,Time.deltaTime * jumpTime),0);
		col.height = 15f;
	}
	
	void timeJump ()
	{
		Invoke ("jumpCollider", 0.1f);
	}

I thought I had this working, but there is a problem. For some reason, physics aren’t animating now. I have a raycast looking for the ground, but it doesn’t seem to be working…