// Use this for initialization
    void Start()
    {
        rotationType = RotationType.Pinch;

        //sm = PXCMSession.CreateInstance();
        /* Initialize a PXCMSenseManager instance */
        sm = PXCMSenseManager.CreateInstance();
        if (sm != null)
        {
            /* Enable hand tracking and configure the hand module */
            pxcmStatus sts = sm.EnableHand();
            if (sts == pxcmStatus.PXCM_STATUS_NO_ERROR)
            {
                /* Hand module interface instance */
                hand = sm.QueryHand();
                /* Hand data interface instance */
                hand_data = hand.CreateOutput();

                // Create hand configuration instance and configure
                hcfg = hand.CreateActiveConfiguration();
                hcfg.EnableAllAlerts();
                hcfg.SubscribeAlert(OnFiredAlert);
                hcfg.EnableNormalizedJoints(true);
                hcfg.ApplyChanges();
                hcfg.Dispose();

                /* Initialize the execution pipeline */
                if (sm.Init() != pxcmStatus.PXCM_STATUS_NO_ERROR)
                {
                    OnDisable();
                }
            }
        }
    }
    // Use this for initialization
    void Start()
    {
        // Set up the reference to the aeroplane controller.
        m_Aeroplane = GetComponent <AeroplaneController>();

        /* Initialize a PXCMSenseManager instance */
        sm = PXCMSenseManager.CreateInstance();
        if (sm != null)
        {
            /* Enable hand tracking and configure the hand module */
            pxcmStatus sts = sm.EnableHand();
            if (sts == pxcmStatus.PXCM_STATUS_NO_ERROR)
            {
                /*init hand data structure*/
                handData = new PXCMHandData.IHand[2];

                /* Hand module interface instance */
                hand = sm.QueryHand();
                /* Hand data interface instance */
                hand_data = hand.CreateOutput();

                // Create hand configuration instance and configure
                hcfg = hand.CreateActiveConfiguration();
                hcfg.EnableAllAlerts();
                hcfg.SubscribeAlert(OnFiredAlert);
                hcfg.EnableNormalizedJoints(true);
                hcfg.ApplyChanges();
                hcfg.Dispose();

                /* Initialize the execution pipeline */
                if (sm.Init() != pxcmStatus.PXCM_STATUS_NO_ERROR)
                {
                    OnDisable();
                }
            }
        }
    }