To ensure optimal translation of rotation data from the animation clips to your custom 3D models, the source skeleton utilizes a standard 15-bone minimum configuration for the base Humanoid mapping. Key elements of this skeletal architecture include:
(0,0,0) at the character's ground contact plane. This enables precise calculation of Root Motion velocities, allowing the physics engine to drive character displacement based on the actual physical translation defined in the animation curves.The pack provides options for both workflow types, each suited for distinct architectural approaches:
For physics-driven setups, utilizing Root Motion is recommended. The Root Transform Position (Y) should be baked into pose to prevent vertical jittering during high-speed runs, while the Root Transform Position (XZ) should remain driven by the animation clip curves to maintain perfect kinematic synchronization between physical foot-strikes and character velocity. For arcade-style or highly responsive controller systems where velocity is calculated dynamically via a CharacterController or Rigidbody, the In-Place animations should be mapped, with movement speed regulated programmatically.
To maximize rendering performance, characters configured with these animations should adhere to optimized draw-call methodologies:
PlayerSettings).For high-density projects, configuring a LOD Group component on the character prefab is vital. The asset's animation data scales efficiently across varying levels of detail:
At close range (LOD0), use the full bone weight skinning configuration (typically 4 bones per vertex). For medium distance (LOD1), transition to a 2-bone skinning limit. At long distances (LOD2), drop the bone weight skinning to 1 bone per vertex or transition the character to a lower-resolution static mesh utilizing baked vertex animation textures (VAT) to completely Animator component overhead.
For a runner-centric game, a 2D Freeform Directional Blend Tree or a 1D Blend Tree is utilized. The Blend Tree maps the Speed and Direction parameters directly to the horizontal and vertical blend axes. The blend parameters must be fed from a centralized player control script using hashed string identifiers to avoid performance bottlenecks caused by continuous string lookups at runtime.
Below is an optimized C# script showing how to drive the Animator parameters using hashed IDs, ensuring zero allocation garbage collection during the update loop:
using UnityEngine;
[RequireComponent(typeof(Animator))]
[RequireComponent(typeof(CharacterController))]
public class RunnerCharacterController : MonoBehaviour
{
private Animator _animator;
private CharacterController _characterController;
// Caching hashes for high-performance parameter updates
private static readonly int SpeedHash = Animator.StringToHash("Speed");
private static readonly int IsGroundedHash = Animator.StringToHash("IsGrounded");
private static readonly int JumpTriggerHash = Animator.StringToHash("JumpTrigger");
[Header("Movement Settings")]
[SerializeField] private float movementSpeed = 6.0f;
[SerializeField] private float acceleration = 10.0f;
private float _currentSpeed;
private void Awake()
{
_animator = GetComponent<Animator>();
_characterController = GetComponent<CharacterController>();
}
private void Update()
{
float horizontal = Input.GetAxis("Horizontal");
float vertical = Input.GetAxis("Vertical");
Vector3 inputDirection = new Vector3(horizontal, 0f, vertical).normalized;
float targetSpeed = inputDirection.magnitude * movementSpeed;
_currentSpeed = Mathf.MoveTowards(_currentSpeed, targetSpeed, acceleration * Time.deltaTime);
// Update Animator parameters with hashed values
_animator.SetFloat(SpeedHash, _currentSpeed);
_animator.SetBool(IsGroundedHash, _characterController.isGrounded);
if (_characterController.isGrounded && Input.GetButtonDown("Jump"))
{
_animator.SetTrigger(JumpTriggerHash);
// Implement jump physics handling here
}
// Apply movement vector if not using Root Motion
if (inputDirection.magnitude >= 0.1f)
{
Vector3 moveDirection = transform.transform.TransformDirection(inputDirection);
_characterController.Move(moveDirection * (_currentSpeed * Time.deltaTime));
}
}
}
| Category | 3D / Animations |
|---|---|
| Latest Version | v1.0.1 |
| File Size | 76.86 MB |
| Added to Platform | February 6, 2026 |
| Views | 9 views |
| Downloads | 2 downloads |
| Favourites | 2 favourites |
| Issue with Package? | Report Broken Link → |