Esempio n. 1
0
    void Start()
    {
        Offset  = new Vector3(0, -1.11f, 0);
        Offset2 = new Vector3(0, 0.67f, 0);

        ArmOffset  = new Vector3(-0.33f, -0.69f, 0.34f);
        calibrator = new MyCalibrator(TrackedHead, TrackedChest.transform.localRotation, TrackedLeftUpperArm.transform.localRotation, TrackedRightUpperArm.transform.localRotation);
        NSManager.Instance.SetImuCalibrator(calibrator);


        _elbowJoint = GameObject.CreatePrimitive(PrimitiveType.Sphere);
        _elbowJoint.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
        _elbowJoint.name = "ElbowJoint";


        _forearm = GameObject.CreatePrimitive(PrimitiveType.Capsule);
        _forearm.transform.localScale = new Vector3(.2f, 0.2f, 0.2f);

        _forearm.name = "ForearmSegment";

        _upperarm      = GameObject.CreatePrimitive(PrimitiveType.Capsule);
        _upperarm.name = "UpperArmSegment";

        upperarmLength = 0.40f;
        //ArmMeasureObject = _upperarm;
        forearmLength = 0.42f;

        ForceTransparent(_elbowJoint);
        ForceTransparent(_forearm);
        ForceTransparent(_upperarm);

        //vertshoulder = -0.21
        //horizshoulder = 0.15
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     calibrator = new MyCalibrator();
     NSManager.Instance.SetImuCalibrator(calibrator);
     prevChest = calibrator.GetOrientation(Imu.Chest);
 }