Added FinalIK

This commit is contained in:
2026-08-12 16:46:38 +03:00
parent 487e0d72ff
commit 1dc80339d4
1124 changed files with 768831 additions and 139 deletions
@@ -0,0 +1,33 @@
using UnityEngine;
using System.Collections;
using RootMotion.FinalIK;
namespace RootMotion.Demos {
/// <summary>
/// Transfer motion from this Transform to the "to" Transform.
/// </summary>
public class TransferMotion : MonoBehaviour {
[Tooltip("The Transform to transfer motion to.")]
public Transform to;
[Tooltip("The amount of motion to transfer.")]
[Range(0f, 1f)] public float transferMotion = 0.9f;
private Vector3 lastPosition;
void OnEnable() {
lastPosition = transform.position;
}
void Update() {
Vector3 delta = transform.position - lastPosition;
// Add the position delta of this Transform to the other Transform
to.position += delta * transferMotion;
lastPosition = transform.position;
}
}
}