0 votes
asked in VRIK by (160 points)
Hello! I'm trying to combine animation & VRIK solution, and having this kind of issue.
When I moving user with trackpad, I'm setting up VRIK wight on 0, to let animator control it body, and when it's stops, I'm swiching IK back.

But the problem is, when character moving away, and when IK weight setting on 1, it's start to crouch from old position.

Here is the video:

Is there any old position update method ? or something like that!

Thank you!

1 Answer

0 votes
answered by (160 points)

I found one solution, which helped me!
So you need to Lerp weight, and on early moments VR IK will setting up on small coefficent of weight, and this will be unnoticed !

Here is coroutine example:

private IEnumerator FadeOut(float start, float finish, float time)
            //yield return null;
            float elapsedTime = 0;
            ikManager.solver.IKPositionWeight = start;
            while (elapsedTime < time)
                ikManager.solver.IKPositionWeight = Mathf.Lerp(start, finish, (elapsedTime / time));
                elapsedTime += Time.deltaTime;
               yield return new WaitForEndOfFrame();

Welcome to RootMotion Q&A, where you can ask questions and receive answers from the developer of Final IK and PuppetMaster and other members of the community.

Post as a guest, create an account or login via Facebook.

Please use the correct category when you post your questions.