
Graph‑Based Dungeon Generation Architecture in Unity
July 31, 2026
Best Way to Import Mixamo Animations to Unity (Clean & Professional Workflow)
August 2, 2026Foot sliding is one of the most common animation issues in Unity. It happens when a character’s feet appear to glide across the ground instead of sticking naturally during movement. This problem breaks immersion and makes even high-quality animations look unpolished.
Fortunately, Unity provides several tools to fix this issue using Root Motion, animation settings, and proper movement synchronization.
1. What Causes Foot Sliding?
Foot sliding usually happens when the character’s movement speed does not match the animation speed. For example, if the animation shows a walking cycle that moves forward slowly but the character controller moves the character faster, the feet will slide across the ground.
Common causes include:
- Character speed not matching animation speed
- Root motion disabled while using root-motion animations
- Incorrect animation import settings
- Using physics or transform movement incorrectly
- Improper blend tree setup
2. Understanding Root Motion
Root Motion means that the movement of the character is driven directly by the animation itself rather than by code. The animation’s root bone determines how the character moves in the world.
When Root Motion is enabled, Unity extracts movement data from the animation and applies it to the GameObject transform.
To enable Root Motion:
- Select the character with the Animator component
- Enable Apply Root Motion
3. Enabling Root Motion Through Script
You can also control root motion through code if you need more control over movement.
using UnityEngine;
public class RootMotionController : MonoBehaviour
{
Animator animator;
void Start()
{
animator = GetComponent<Animator>();
animator.applyRootMotion = true;
}
}
4. Using OnAnimatorMove for Custom Root Motion
Sometimes developers want to modify root motion manually. Unity provides the OnAnimatorMove() function to override the default root motion behavior.
using UnityEngine;
public class RootMotionMovement : MonoBehaviour
{
Animator animator;
void Start()
{
animator = GetComponent<Animator>();
}
void OnAnimatorMove()
{
transform.position += animator.deltaPosition;
transform.rotation *= animator.deltaRotation;
}
}
5. Matching Animation Speed with Character Speed
Another common fix is synchronizing the animation speed with the character’s movement speed. If your character moves faster than the animation cycle, the feet will slide.
You can fix this by adjusting the animation speed parameter.
animator.SetFloat("Speed", characterVelocity);
This value is usually used in a Blend Tree to smoothly transition between idle, walk, and run animations.
6. Fixing Foot Sliding with Blend Trees
Blend Trees help synchronize animations with movement speed. Instead of abruptly switching animations, Unity blends between them smoothly.
A typical setup includes:
- Idle animation (Speed = 0)
- Walk animation (Speed ≈ 2)
- Run animation (Speed ≈ 6)
The character speed drives the blend tree parameter, ensuring the animation matches the movement velocity.
7. Fixing Import Settings
Sometimes the issue comes from incorrect animation import settings.
Check these settings:
- Set Animation Type to Humanoid or Generic
- Enable Root Transform Position (XZ)
- Ensure the root bone is properly assigned
- Verify the avatar is configured correctly
8. Locking Feet with Animation Events
Advanced animation systems sometimes use animation events to lock the feet when they touch the ground. This prevents the character from sliding during foot contact frames.
Although this method is more complex, it produces extremely realistic character motion.
9. Debugging Foot Sliding
If the issue still persists, check the following:
- Is Root Motion enabled?
- Does the animation actually contain root movement?
- Is the character speed too high?
- Are animations properly looped?
Conclusion
Foot sliding can make even well-designed characters look unnatural. By properly using Root Motion, synchronizing animation speed with movement speed, and configuring your animator controller correctly, you can eliminate sliding and achieve realistic character motion in Unity.
A well-tuned animation system dramatically improves the overall feel of your game and makes characters appear grounded and believable.









