void Start() { IAvatar playbackAvatar = RiggedPlaybackAvatar as IAvatar ?? PlaybackAvatar; playbackAvatar.SwapSkeletonProvider(Playback); Playback.Reset(); }
public void Init(Technique t) { technique = t; comparer = SkeletonComparer.GetComparer(CurveProvider.Curve); VariableHolder.RecordedSkeletonFrames = t.TechniqueFrames; PreviewPlayback.RefreshSkeletonFrames(); FinishedPlayback.RefreshSkeletonFrames(); PlaybackAvatar.SwapSkeletonProvider(PreviewPlayback); UserAvatar.SwapSkeletonProvider(CurrentUserTracker.Instance); PlaybackAvatar.SetEnabled(true); UserAvatar.SetEnabled(true); }
public void SetupTrainingFinished(IEnumerable <Skeleton> recordedFrames) { VariableHolder.RecordedSkeletonFrames = recordedFrames.Select(s => (SerializableSkeleton)s).ToArray(); UserPlayback.RefreshSkeletonFrames(); UserAvatar.SwapSkeletonProvider(UserPlayback); TechniqueAvatar.SwapSkeletonProvider(TechniquePlayback); int minEndFrame = Mathf.Min(TechniquePlayback.EndFrame, UserPlayback.EndFrame); UserPlayback.SetStartEndFrames(0, minEndFrame); TechniquePlayback.SetStartEndFrames(0, minEndFrame); UserPlayback.Reset(); TechniquePlayback.Reset(); }