Пример #1
0
    // Token: 0x060051E2 RID: 20962 RVA: 0x001C09CC File Offset: 0x001BEDCC
    public static Transform GetTrackedTransform(VRC_PlayerApi player, VRC_PlayerApi.TrackingDataType tt)
    {
        if (player == null)
        {
            return(null);
        }
        Transform result = null;

        if (tt != VRC_PlayerApi.TrackingDataType.Head)
        {
            if (tt != VRC_PlayerApi.TrackingDataType.LeftHand)
            {
                if (tt == VRC_PlayerApi.TrackingDataType.RightHand)
                {
                    IkController componentInChildren = player.GetComponentInChildren <IkController>();
                    if (componentInChildren != null)
                    {
                        result = componentInChildren.RightEffector.transform;
                    }
                }
            }
            else
            {
                IkController componentInChildren = player.GetComponentInChildren <IkController>();
                if (componentInChildren != null)
                {
                    result = componentInChildren.LeftEffector.transform;
                }
            }
        }
        else if (player.isLocal)
        {
            VRCTrackingManager vrctrackingManager = UnityEngine.Object.FindObjectOfType <VRCTrackingManager>();
            if (vrctrackingManager != null)
            {
                Camera componentInChildren2 = vrctrackingManager.GetComponentInChildren <Camera>();
                if (componentInChildren2 != null)
                {
                    result = componentInChildren2.transform;
                }
            }
        }
        return(result);
    }
Пример #2
0
    // Token: 0x060051E3 RID: 20963 RVA: 0x001C0A90 File Offset: 0x001BEE90
    public static Transform GetBoneTransform(VRC_PlayerApi player, HumanBodyBones humanBoneId)
    {
        Transform result = null;
        Animator  componentInChildren = player.GetComponentInChildren <Animator>();

        if (componentInChildren != null)
        {
            result = componentInChildren.GetBoneTransform(humanBoneId);
        }
        return(result);
    }