- Home /
How to store the bone position after animation, but before it will be modified by a script?
Hi guys. I`ve made a script which makes a dynamic movement for a bone chain. It adds the inertia, gravity, friction etc to an every bone. I use it on the creature tail and it works perfectly.
Now I want to use this effect on the creature spine. But I want to use it with a characters animation which I created early. So when I move the creature in the world space, its spine keep moves with animation but slowly bend by dynamic along the direction. But now I stuck. I only can achieve the dynamic which overrides the spine-animation. I feel like I don`t have enough knowledges on this step.
So what is my question? Inertia and friction etc depends from a current bone position. But If I will directly add the modified position to a current bone position, then in next frame I will receive a loop. And my bone will fly away. So I thing I need to store the fresh ONLY "after animation" bone position with no modification. Then add the dynamics to it in a LateUpdate. And in next frame again take not the resulting position but "after animation" position. Etc, again and again.
Is it achievable?