0 votes
asked in Rotation Limits by
edited
What is the exact steps to apply rotation limit hinge when using VRIK

I followed all the instructions linked below

http://root-motion.com/qa/index.php?qa=11&qa_1=rotation-limits-not-working-with-vrik

but still can't make it. I added a rotation limit hinge component on model's knee and made a script which disable it in start() and then apply it in LateUpdate(). Here is my code:

using RootMotion.FinalIK;

    public RotationLimitHinge rotation;

    // Start is called before the first frame update
    void Start()
    {
        rotation.GetComponent<RotationLimitHinge>();
        rotation.Disable();
    }

    // Update is called once per frame
    void Update()
    {
       
    }

    private void LateUpdate()
    {
        rotation.Apply();
    }

This script is higher than VRIK

Can anybody help me figure that out? Thanks!

1 Answer

0 votes
answered by (24.4k points)
Hey,

VRIK already uses an internal constraint to keep the knee constrained as a hinge joint. If the knee just bends in the wrong direction, you should rotate the knee bone in Editor to make the leg slightly bent in it's natural bending direction, because VRIK samples the leg at Start  to find out which way to bend it.

Best,

Pärtel

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.

...