Exemple #1
0
    private void RecordKeyframe()
    {
        Vec3ListWrapper newKeyFrame = new Vec3ListWrapper();

        // Iterate through each joint and output code to console with initialized vector3 list
        foreach (KeyValuePair <JointType, GameObject> jointData in m_jointObjects)
        {
            Vec3Wrapper vec3 = new Vec3Wrapper();
            vec3.vector = jointData.Value.transform.position;
            newKeyFrame.vec3List.Add(vec3);
        }

        m_keyframeData.KeyFrames.Add(newKeyFrame);
        Debug.Log("Added new keyframe!");
    }
Exemple #2
0
    private void RecordKeyframe()
    {
        Vec3ListWrapper newKeyFrame = new Vec3ListWrapper();

        // Iterate through each joint and save the position of each joint to the specified keyframe.
        foreach (KeyValuePair <JointType, GameObject> jointData in m_jointObjects)
        {
            Vec3Wrapper vec3 = new Vec3Wrapper();
            vec3.vector    = jointData.Value.transform.position;
            vec3.jointType = jointData.Key;
            vec3.handState = jointData.Value.GetComponent <JointTracker>().handState;
            newKeyFrame.vec3List.Add(vec3);
        }

        m_keyframeData.KeyFrames.Add(newKeyFrame);
    }