Locomotion System not starting after Dancing

I am working on a project that utilizes multiple characters on screen using the Locomotion System to walk around the environment. Every few minutes a global dance event occurs, where all the characters stop where they are, face the camera, and dance in unison to the music. This works great so far, however when they get to the end of the dance, and it’s time to start walking around again, they seem to get stuck on the last frame of the dance animation. They will move around the environment according to the input values given to them, but they won’t animate the walk/run cycles properly.

Here’s a snippet from my controller script:

void Update () {
		// get vector towards person being tracked
		if(person.wasUpdatedSinceLastCheck()){
			lastUpdate = Time.time;
		}
		Vector3 directionVector = person.getPosition() - transform.position;
		// Make input vector relative to Character's own orientation
		directionVector = Quaternion.Inverse(transform.rotation) * directionVector;
		// adjust speed
		directionVector *= walkMultiplier;
		if(!dancing){
			// Apply direction
			motor.desiredMovementDirection = directionVector;
		} else {
			motor.desiredMovementDirection = new Vector3(0,0,0);
			// check if still dancing
			if(!animation.IsPlaying("Thriller")){
				dancing = false;
				
			}
		}

And here is the method in the super class for the controllers attached to all of my characters that causes them to dance:

public void dance(){
		Vector3 v = Camera.main.transform.position - transform.position;
        v.x = v.z = 0.0f;
        transform.LookAt(Camera.main.transform.position - v);
		animation.CrossFade("Thriller");
		dancing = true;
	}

bumping this with a TLDR description:

Starts with locomotion system, crossfades into full body animation, freezes at end of full body animation.

I don’t see anything where you crossfade or mix back to your run and/or walk animations. This could be why they do not play. Blend the end of the dance anim back into your walk/run/idle cycles.

HTH
BTH

How do I blend to three different animation cycles without calling a direct play on them? Should I set all their weights to 1 and the dancing animation weight to 0?

SOLVED.

I had to crossfade into the “locomotion” animation which is only generated when the program is run.