Beispiel #1
0
        //protected virtual void UpdateIKTargetPosFromCalibrationPose(QuickVRNode node, HumanBodyBones boneID)
        //{
        //    UpdateIKTargetPosFromCalibrationPose(node, boneID, Vector3.one);
        //}

        //protected virtual void UpdateIKTargetPosFromCalibrationPose(QuickVRNode node, HumanBodyBones boneID, Vector3 offsetScale)
        //{
        //    Transform t = GetIKSolver(boneID)._targetLimb;
        //    Transform calibrationPose = node.GetCalibrationPose();
        //    if (!t || !calibrationPose) return;

        //    t.localPosition = GetIKSolver(boneID).GetInitialLocalPosTargetLimb();
        //    Vector3 offset = Vector3.Scale(node.GetTrackedObject().transform.position - calibrationPose.position, offsetScale);
        //    t.position += offset;
        //}

        //protected virtual void UpdateIKTargetRotFromCalibrationPose(QuickVRNode node, HumanBodyBones boneID)
        //{
        //    Transform t = GetIKSolver(boneID)._targetLimb;
        //    Transform calibrationPose = node.GetCalibrationPose();
        //    if (!t || !calibrationPose) return;

        //    t.localRotation = GetIKSolver(boneID).GetInitialLocalRotTargetLimb();
        //    Quaternion rotOffset = node.GetTrackedObject().transform.rotation * Quaternion.Inverse(calibrationPose.rotation);
        //    t.rotation = rotOffset * t.rotation;
        //}

        protected virtual void UpdateVRCursors()
        {
            QuickUICursor.GetVRCursor(QuickUICursor.Role.LeftHand).transform.position  = _animator.GetBoneTransform(HumanBodyBones.LeftIndexDistal).position;
            QuickUICursor.GetVRCursor(QuickUICursor.Role.RightHand).transform.position = _animator.GetBoneTransform(HumanBodyBones.RightIndexDistal).position;
        }
Beispiel #2
0
 protected virtual QuickUICursor GetCursor()
 {
     return(QuickUICursor.GetVRCursor(_vrCursorType));
 }