Find() public method

public Find ( Joint key ) : Bone
key Joint
return Bone
示例#1
0
        /// <summary>
        /// // Update tracking marker positions
        /// </summary>
        /// <param name="segment"></param>
        private void updateTrackingMarkers(Joint segment)
        {
            List <string> labelList = new List <string>(this.segments[segment].Keys);

            foreach (var label in labelList)
            {
                this.segments[segment][label] = (label == ORIGIN) ? skeleton.Find(segment).Pos : this.markers[label];
            }
        }
 /// <summary>
 /// If using head rotation from oculus instead of from markers
 /// </summary>
 /// <param name="b">The head bone as defiention what rotation is forward</param>
 void SetCameraPosition(Bone b)
 {
     if (!headCamera)
     {
         GetCamera();
     }
     if (headCamera)
     {
         var cameraAnchor = headCamera.transform.parent;
         cameraAnchor.position =
             charactersJoints.head.position
             + (headCamera.transform.rotation * headCam.CameraOffset);
         if (headCam.UseHeadCamera && !headCam.UseVRHeadSetRotation && headCamera)
         {
             cameraAnchor          = headCamera.transform.parent;
             cameraAnchor.rotation = skeleton.Find(Joint.HEAD).Orientation.Convert();
         }
     }
 }