Skip to content

Instantly share code, notes, and snippets.

@emilianavt
emilianavt / IKRunner.cs
Last active February 8, 2024 10:42
This component uses the UnityEngine.LowLevel API to run Final IK things before Unity constraints and particle systems are evaluated.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.LowLevel;
using RootMotion.FinalIK;
// Disable IK and TwistRelaxers and set them on this to have them run before constraints and particle systems are evaluated.
// Only one instance of IKRunner is possible, but it should be easy enough to extend.
// Remember to call Start() on the TwistRelaxers once if they are disabled from the beginning. The IK may also need manual initialization.