protected void OnEnable()
        {
            skeletonMainPoseProperty        = serializedObject.FindProperty("skeletonMainPose");
            skeletonAdditionalPosesProperty = serializedObject.FindProperty("skeletonAdditionalPoses");

            showLeftPreviewProperty  = serializedObject.FindProperty("showLeftPreview");
            showRightPreviewProperty = serializedObject.FindProperty("showRightPreview");

            previewLeftInstanceProperty  = serializedObject.FindProperty("previewLeftInstance");
            previewRightInstanceProperty = serializedObject.FindProperty("previewRightInstance");

            previewLeftHandPrefab  = serializedObject.FindProperty("overridePreviewLeftHandPrefab");
            previewRightHandPrefab = serializedObject.FindProperty("overridePreviewRightHandPrefab");

            previewPoseSelection = serializedObject.FindProperty("previewPoseSelection");

            poseEditorExpanded  = serializedObject.FindProperty("poseEditorExpanded");
            blendEditorExpanded = serializedObject.FindProperty("blendEditorExpanded");

            poserScale = serializedObject.FindProperty("scale");


            blendingBehaviourArray = serializedObject.FindProperty("blendingBehaviours");


            poser = (SteamVR_Skeleton_Poser)target;
        }
Beispiel #2
0
 /// <summary>
 /// Blend from the current skeletonBlend amount to full bone data. (skeletonBlend = 1)
 /// </summary>
 /// <param name="overTime">How long you want the blend to take (in seconds)</param>
 public void BlendToSkeleton(float overTime = 0.1f)
 {
     if (blendPoser != null)
     {
         blendSnapshot = blendPoser.GetBlendedPose(this);
     }
     blendPoser = null;
     BlendTo(1, overTime);
 }
 /// <summary>
 /// Blend from the current skeletonBlend amount to pose animation. (skeletonBlend = 0)
 /// Note: This will ignore the root position and rotation of the pose.
 /// </summary>
 /// <param name="overTime">How long you want the blend to take (in seconds)</param>
 /// <param name="attachToTransform">If you have a positiona and rotation offset for your pose you can attach it to a particular transform</param>
 public void BlendToPoser(SteamVR_Skeleton_Poser poser, Transform attachToTransform, float overTime = 0.1f)
 {
     if (poser == null)
     {
         return;
     }
     blendPoser = poser;
     BlendTo(0, overTime);
 }
Beispiel #4
0
        protected void OnEnable()
        {
            skeletonPoseProperty = serializedObject.FindProperty("skeletonPose");

            showLeftPreviewProperty  = serializedObject.FindProperty("showLeftPreview");
            showRightPreviewProperty = serializedObject.FindProperty("showRightPreview");

            previewLeftInstanceProperty  = serializedObject.FindProperty("previewLeftInstance");
            previewRightInstanceProperty = serializedObject.FindProperty("previewRightInstance");

            previewLeftHandPrefab  = serializedObject.FindProperty("previewLeftHandPrefab");
            previewRightHandPrefab = serializedObject.FindProperty("previewRightHandPrefab");

            poser = (SteamVR_Skeleton_Poser)target;
        }