Tier 3
Series 204
204F: The Root Drive
"If your code moves the object 5 meters, but the animation only takes 2 steps, the character "Ice Skates." A Pilot audits for "Root Motion," letting the animation drive the physics for perfect foot planting."
The Concept: Root Motion
The delta position of the animation is applied to the Transform.
* **OnAnimatorMove:** The callback where you intercept the motion.
* **Coupling:** `NavMeshAgent.velocity = animator.deltaPosition / Time.deltaTime;`
* **OnAnimatorMove:** The callback where you intercept the motion.
* **Coupling:** `NavMeshAgent.velocity = animator.deltaPosition / Time.deltaTime;`
Red Flag Detected
The AI Trap: "The Ice Skater"
You ask the AI: "Move the character forward."
// AI-Generated Code: Desync
void Update() {
// Audit Fail: Moving the transform manually while an animation plays.
transform.Translate(Vector3.forward * speed);
}
This is "Foot Sliding." The feet move at a different speed than the floor, breaking immersion.
Elite Telemetry
Research shows "Elite" teams achieve 15% faster lead times by keeping AI on a "very tight leash."
- Small Batches Solving one problem at a time prevents logic drift.
- Modular Design Localizing the "blast radius" of AI changes.
- Tight Loops Rapid iteration with constant code review.
The Pilot's Correction
Corrective Protocol
// Corrected: Coupled Physics
void OnAnimatorMove() {
agent.velocity = animator.deltaPosition / Time.deltaTime;
}
Your Pilot Command
> A skilled Pilot directs the AI to couple Root Motion. You command: "Enable ApplyRootMotion and transfer the animation data to the Rigidbody or NavMeshAgent in OnAnimatorMove."