0 votes
asked in General Help by
Regarding #2 where would be a good place to put this?
related to an answer for: VRIK - several questions

1 Answer

0 votes
answered by (24.6k points)

Hey, sorry for being vague...

So make a new script, name it VRIKHeightCalibration, then paste this code in:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RootMotion.FinalIK;

public class VRIKHeightCalibration : MonoBehaviour {

    public VRIK ik;

    public void CalibrateHeight() {
        float sizeF = (ik.solver.spine.headTarget.position.y - ik.references.root.position.y) / (ik.references.head.position.y - ik.references.root.position.y);

        ik.references.root.localScale *= sizeF;


Add it to the VRIK gameobject, assign the "IK" field in the Editor. Then you can call CalibrateHeight() on it whenever you wish to calibrate the height.



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.