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,37 @@
using UnityEngine;
using System.Collections;
namespace RootMotion.Demos {
public class SoccerDemo : MonoBehaviour {
private Animator animator;
private Vector3 defaultPosition;
private Quaternion defaultRotation;
void Start () {
animator = GetComponent<Animator>();
// Remember the default position and rotation of the character
defaultPosition = transform.position;
defaultRotation = transform.rotation;
StartCoroutine(ResetDelayed());
}
// Reset the character after some time and restart the animation
private IEnumerator ResetDelayed() {
while (true) {
yield return new WaitForSeconds(3f);
transform.position = defaultPosition;
transform.rotation = defaultRotation;
animator.CrossFade("SoccerKick", 0f, 0, 0f);
yield return null;
}
}
}
}