public SolveSkeleton ( List |
||
markerData | List |
A list of markers |
return |
/// <summary> /// ... /// </summary> public void ResetSkeleton() { if (DEBUG.enabled) { Debug.Log("Reset Skeleton..."); } charactersJoints.SetLimbs(this.transform, UseFingers); //charactersJoints.PrintAll(); skeletonBuilder = new SkeletonBuilder(); skeletonBuilder.MarkerPrefix = ActorMarkerPrefix; skeletonBuilder.SetBodyData(actorHeight, actorMass); skeletonBuilder.SolveWithIK = UseIK; skeletonBuilder.UseTrackingMarkers = UseTrackingMarkers; if (markerData != null) { skeleton = skeletonBuilder.SolveSkeleton(markerData); } else { skeleton = new BipedSkeleton(); } if (ScaleMovementToSize) { scale = FindScale(); } else { scale = 0; } }
/// <summary> /// Updates the rotation and position of the Character /// </summary> public void Update() { if (rtClient == null) { rtClient = RTClient.GetInstance(); } if (!rtClient.GetStreamingStatus()) { return; } markerData = rtClient.Markers; if ((markerData == null || markerData.Count == 0)) { Debug.LogError("The stream does not contain any markers"); return; } if (skeletonBuilder != null) { skeleton = skeletonBuilder.SolveSkeleton(markerData); } else { ResetSkeleton(); } SetAll(); if (!headCam.UseHeadCamera && headCamera) { DestroyCamera(); } }
public void ResetSkeleton() { charactersJoints.SetLimbs(this.transform, UseFingers); skeletonBuilder = new SkeletonBuilder(); skeletonBuilder.MarkerPrefix = ActorMarkersPrefix; skeletonBuilder.SolveWithIK = UseIK; if (markerData != null) skeleton = skeletonBuilder.SolveSkeleton(markerData); else skeleton = new BipedSkeleton(); if (ScaleMovementToSize) scale = FindScale(); else scale = 0; }
public void ResetSkeleton() { charactersJoints.SetLimbs(this.transform, UseFingers); skeletonBuilder = new SkeletonBuilder(); skeletonBuilder.MarkerPrefix = ActorMarkersPrefix; skeletonBuilder.SolveWithIK = UseIK; if (markerData != null) { skeleton = skeletonBuilder.SolveSkeleton(markerData); } else { skeleton = new BipedSkeleton(); } if (ScaleMovementToSize) { scale = FindScale(); } else { scale = 0; } }