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,32 @@
using UnityEngine;
using System.Collections;
using RootMotion.FinalIK;
namespace RootMotion.Demos {
/// <summary>
/// Demonstrating character-character FBBIK interaction.
/// </summary>
public class InteractionC2CDemo : MonoBehaviour {
// GUI for testing
void OnGUI() {
if (GUILayout.Button("Shake Hands")) {
character1.StartInteraction(FullBodyBipedEffector.RightHand, handShake, true);
character2.StartInteraction(FullBodyBipedEffector.RightHand, handShake, true);
}
}
public InteractionSystem character1, character2; // The InteractionSystems of the characters
public InteractionObject handShake; // The HandShake InteractionObject
void LateUpdate() {
// Positioning the handshake to the middle of the hands
Vector3 handsCenter = Vector3.Lerp(character1.ik.solver.rightHandEffector.bone.position, character2.ik.solver.rightHandEffector.bone.position, 0.5f);
handShake.transform.position = handsCenter;
}
}
}